Re: obtaining column names from tables or views

From: Richard Huxton <dev(at)archonet(dot)com>
To: John van Zantvoort <snl(dot)jydawg(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: obtaining column names from tables or views
Date: 2007-11-28 15:29:23
Message-ID: 474D8953.6060900@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

John van Zantvoort wrote:
> moin,
>
> I've got a question. I'm scripting against an existing postgresql database
> environment and need to tweak queries based on the columns in the views or
> tables, how can if find these w/o querying the tables or views.

There is a whole section of the manual devoted to the system catalogues:
http://www.postgresql.org/docs/8.2/static/catalogs.html
Or there's the "information schema" which is in a standardised layout
but doesn't include PG-specific details.
http://www.postgresql.org/docs/8.2/static/information-schema.html

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Erik Jones 2007-11-28 19:00:49 Re: NULLIF problem
Previous Message John van Zantvoort 2007-11-28 15:13:16 obtaining column names from tables or views