Clarification question

From: "Tim Barnard" <tbarnard(at)povn(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Clarification question
Date: 2002-01-19 22:10:09
Message-ID: 00a801c1a136$0faa27c0$a519af3f@hartcomm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is the following select sufficient and correct for extracting the column
names of a table, excluding all system columns?

select attname from pg_attribute
where attrelid=
(select relfilenode from pg_class
where relname like <insert table name here>)
and attnum > 0

I want to be certain that no system columns are returned, only columns I've
created.

Am I overlooking anything?

Thanks!

Tim Barnard
S.E. Mgr
Hartford Communications Corporation

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sean Chittenden 2002-01-19 22:15:06 Re: "IS NOT NULL" != "NOT NULL"
Previous Message Tom Lane 2002-01-19 21:46:38 Re: "IS NOT NULL" != "NOT NULL"