Re: How do you query all columns and all tables for a specific string - Mailing list pgsql-novice

From A. Kretschmer
Subject Re: How do you query all columns and all tables for a specific string
Date
Msg-id 20100323060404.GB23688@a-kretschmer.de
Whole thread Raw
In response to How do you query all columns and all tables for a specific string  (Ryan Garvey <ryan.garvey1@gmail.com>)
List pgsql-novice
In response to Ryan Garvey :
> 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?

That's not the usual way to deal with a database, but you can create a
database-dump and use tools like grep to find your number in the dump. I
think, this is the fastest way. If you have found your number you can
read the dump to obtain, which table/column holds this value.


Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

pgsql-novice by date:

Previous
From: Neil Stlyz
Date:
Subject: string functions and operators
Next
From: Jasen Betts
Date:
Subject: Re: How do you query all columns and all tables for a specific string