obtaining column names from tables or views

From: "John van Zantvoort" <snl(dot)jydawg(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: obtaining column names from tables or views
Date: 2007-11-28 15:13:16
Message-ID: 872c5faa0711280713t4627c24fj2992abe1487df9ed@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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.

Currently I execute the querie and collect the columns but this is rather
expensive, silly and fails when the table or view is empty.

--
Met vriendelijke groeten/with kind regards

John van Zantvoort

---
Most burning issues generate far more heat than light.

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM d-- s:+ a C++ UL++++ P+++ L++ E--- W++ N+ o-- K- w
O M- V- PS+ PE- Y PGP++ t 5 X R- tv- b+ DI+ D+
G e h--- r++ y++
------END GEEK CODE BLOCK------

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2007-11-28 15:29:23 Re: obtaining column names from tables or views
Previous Message Bruce Momjian 2007-11-28 04:50:51 Re: Strang behaviour SELECT ... LIMIT n FOR UPDATE