Re: How do you query all columns and all tables for a specific string

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: How do you query all columns and all tables for a specific string
Date: 2010-03-23 08:46:37
Message-ID: ho9v5d$1ra$1@reversiblemaps.ath.cx (view raw or flat)
Thread:  2010-03-23 08:46:37 from Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
Lists: pgsql-novice
On 2010-03-22, Ryan Garvey <ryan(dot)garvey1(at)gmail(dot)com> wrote:
> --001517448026efc884048265d16b
> Content-Type: text/plain; charset=ISO-8859-1
>
> I recently inhereted a database that I know nothing about that has hundreds
> of tables most of which have meaningless names, or at least to me. I am
> trying to find a table and column that holds a specific serial number. I
> have no idea what table or what column it would be stored in. Is it possible
> to search the entire database?

you could scan a dump of the for the serial number you want and work
back from there.


eg: assuming the serial you want is '1234237854'

  pg_dump databasename | egrep  '^COPY|1234237854' | grep -B1 '1234237854'

相关文章:

  • 2021-11-15
  • 2022-12-23
  • 2022-02-27
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
  • 2021-08-21
  • 2021-10-21
猜你喜欢
  • 2021-08-09
  • 2022-01-25
  • 2022-01-16
  • 2021-09-01
  • 2022-12-23
  • 2021-10-22
  • 2022-12-23
相关资源
相似解决方案