Re: How to retrieve a comment/description from a table - Mailing list pgsql-general

From Tom Lane
Subject Re: How to retrieve a comment/description from a table
Date
Msg-id 27148.1030116153@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to retrieve a comment/description from a table  (Marcus Claesson <marcus.claesson@angiogenetics.se>)
List pgsql-general
Marcus Claesson <marcus.claesson@angiogenetics.se> writes:
> What I wish is to retrieve the comment with a sql question, which would work
> if the '\d+ information' could be found in an actual table somewhere.

The descriptions are kept in pg_description.  Although you can just do
"select from pg_description", the recommended retrieval method is the
obj_description() function.  See
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/functions-misc.html
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/catalog-pg-description.html

            regards, tom lane

pgsql-general by date:

Previous
From: Christoph Dalitz
Date:
Subject: alter table ad primary key
Next
From: "Peter Gibbs"
Date:
Subject: Re: How to retrieve a comment/description from a table