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

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: How do you query all columns and all tables for a specific string
Дата
Msg-id ho9v5d$1ra$1@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на How do you query all columns and all tables for a specific string  (Ryan Garvey <ryan.garvey1@gmail.com>)
Список pgsql-novice
On 2010-03-22, Ryan Garvey <ryan.garvey1@gmail.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'





В списке pgsql-novice по дате отправления:

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: How do you query all columns and all tables for a specific string
Следующее
От: "Machiel Richards"
Дата:
Сообщение: Calculating database sizes using a script