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

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: How to query for a user-table column name?
Дата
Msg-id 20080110094755.4721ae1f@commandprompt.com
обсуждение исходный текст
Ответ на How to query for a user-table column name?  (Kevin Kempter <kevin@kevinkempterllc.com>)
Список pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 10 Jan 2008 10:38:16 -0700
Kevin Kempter <kevin@kevinkempterllc.com> 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-----

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

Предыдущее
От: Kevin Kempter
Дата:
Сообщение: How to query for a user-table column name?
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Storing and querying boolean fields