Search Postgresql Archives

Re: How to query for a user-table column name?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 10 Jan 2008 10:38:16 -0700
Kevin Kempter <kevin@xxxxxxxxxxxxxxxxxxx> wrote:

> Hi List;
> 
> I'm researching a db and I want to find samples of some of the data.
> I know based on the documentation for the proposed "new" schema that
> the db I have access to (the "old" schema) probably has a column in
> one or more of the user tables called 'region'. 
> 
> I'm looking for a way to query the system tables to find all user
> tables with a column named region.  Any thoughts, help?

select * from information_schema.columns?

 table_catalog            | information_schema.sql_identifier  | 
 table_schema             | information_schema.sql_identifier  | 
 table_name               | information_schema.sql_identifier  | 
 column_name              | information_schema.sql_identifier  

Sincerely,

Joshua D. Drake

> 
> 
> Thanks in advance..
> 
> /Kevin
> 
> ---------------------------(end of
> broadcast)--------------------------- TIP 9: In versions below 8.0,
> the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
> 


- -- 
The PostgreSQL Company: Since 1997, http://www.commandprompt.com/ 
Sales/Support: +1.503.667.4564   24x7/Emergency: +1.800.492.2240
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
SELECT 'Training', 'Consulting' FROM vendor WHERE name = 'CMD'


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHhlpNATb/zqfZUUQRAow1AJ9K0ZYm75gJg3/Ti+/xpghkMdm4RwCeK4vU
QXO9VvUK6Dw9NUEgarMTDCM=
=Cgh+
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux