Retrieving a column comment - Mailing list pgsql-general

From Oliver Kohll
Subject Retrieving a column comment
Date
Msg-id 200310262202.22396.oliver@gtwebmarque.com
Whole thread Raw
Responses Re: Retrieving a column comment
List pgsql-general
Hi,

I can't seem to retrieve a comment on a table column. The following copy from
psql should I think return a comment:

====================
mydatabase=> COMMENT ON COLUMN car.manufacturer IS 'manufacturer name';
COMMENT
mydatabase=> SELECT relnamespace FROM pg_class WHERE relname='car';
 relnamespace
--------------
         2200
(1 row)

mydatabase=> SELECT col_description(2200,1);
 col_description
-----------------

(1 row)

====================
i.e. it just returns a blank row.

The col_description is described at
http://www.postgresql.org/docs/7.3/static/functions-misc.html
The field number supplied above '1' is right if the first col in a table is
'0', in fact no number I've tried returns anything.

I can't seem to find any examples at all on the web about retrieving column
COMMENTs. Has anyone done this? Postgres version is 7.3

Regards,

Oliver Kohll
GT webMarque
--


pgsql-general by date:

Previous
From: John DeSoi
Date:
Subject: Re: shared memory on OS X - 7.4beta4
Next
From: "Bob Powell"
Date:
Subject: can't get tcl installed properly