Re: [GENERAL] Get all table names that have a specific column

2005-10-04 Thread Jim C. Nasby
Easy way: SELECT table_name FROM information_schema.columns WHERE column_name = '' or SELECT table_name FROM pg_sysviews.pg_user_table_columns WHERE column_name = '' If those don't work, select from pg_attribute a join pg_class c on (c.oid = a.reloid) On Fri, Sep 30, 2005 at 10:55:44AM -0400, Emi

Re: [GENERAL] Get all table names that have a specific column

2005-09-30 Thread Doug Bloebaum
On 9/30/05, Emi Lu <[EMAIL PROTECTED]> wrote: > Greetings, > > I am not very familiar with the system views/tables in postgreSQL. I'd > like to get all table names that have a column let's say named "col1". I'd use: select table_name   from information_schema.columns where table_schema='my_schem

Re: [GENERAL] Get all table names that have a specific column

2005-09-30 Thread William ZHANG
pgsql stores table names in pg_class.relname, column names in pg_attribute.attname. Read the document and you can get the solution. "Emi Lu" <[EMAIL PROTECTED]> wrote > Greetings, > > I am not very familiar with the system views/tables in postgreSQL. I'd > like to get all table names that have a

Re: [GENERAL] Get all table names that have a specific column

2005-09-30 Thread Bricklen Anderson
Emi Lu wrote: > Greetings, > > I am not very familiar with the system views/tables in postgreSQL. I'd > like to get all table names that have a column let's say named "col1". > > For example, > t1 (... col1 varchar(3) ... ) > t2 (... col1 varchar(3) ... ) > t3 (... ...) > > > After querying the

Re: [GENERAL] Get all table names that have a specific column

2005-09-30 Thread A. Kretschmer
am 30.09.2005, um 10:55:44 -0400 mailte Emi Lu folgendes: > Greetings, > > I am not very familiar with the system views/tables in postgreSQL. I'd like > to get all table names that have a column let's say named "col1". select table_name from information_schema.columns where column_name = 'col1'

[GENERAL] Get all table names that have a specific column

2005-09-30 Thread Emi Lu
Greetings, I am not very familiar with the system views/tables in postgreSQL. I'd like to get all table names that have a column let's say named "col1". For example, t1 (... col1 varchar(3) ... ) t2 (... col1 varchar(3) ... ) t3 (... ...) After querying the system tables/views, I can get the