Clarification question - Mailing list pgsql-general

From Tim Barnard
Subject Clarification question
Date
Msg-id 00a801c1a136$0faa27c0$a519af3f@hartcomm.com
Whole thread Raw
Responses Re: Clarification question  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: "IS NOT NULL" != "NOT NULL"
Next
From: Sean Chittenden
Date:
Subject: Re: "IS NOT NULL" != "NOT NULL"