Get all table names that have a specific column

From: Emi Lu <emilu(at)cs(dot)concordia(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Get all table names that have a specific column
Date: 2005-09-30 14:55:44
Message-ID: 433D51F0.3090406@cs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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 result something
like :

tables contain column "col1"
---------------------------------------------
t1
t2
(2 rows)

Thanks a lot,
Emi

Responses

Browse pgsql-general by date

  From Date Subject
Next Message William ZHANG 2005-09-30 15:20:20 Re: Get all table names that have a specific column
Previous Message Fernando Grijalba 2005-09-30 14:21:14 Help with inventory control