Re: How can I select a comment on a column?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Serguei Pronkine <pronkine(at)krikri(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How can I select a comment on a column?
Date: 2007-03-27 04:10:09
Message-ID: 20070327041009.GB96360@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Mar 26, 2007 at 04:37:59PM +0200, Serguei Pronkine wrote:
> How can I now retrieve column number from column name?

Query pg_attribute.

http://www.postgresql.org/docs/8.2/interactive/catalog-pg-attribute.html

Since psql can display object comments you could study the SQL that
it executes:

\set ECHO_HIDDEN
\d+ mytab

--
Michael Fuhr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-03-27 04:37:08 Re: Could not create relation: File exists error
Previous Message Tom Lane 2007-03-27 03:37:18 Re: [GENERAL] ERROR: out of shared memory