Re: Getting comments from schema using SQL

Started by Jesseabout 19 years ago2 messageshackers
Jump to latest
#1Jesse
google@jessehersch.fastmail.fm

check out the pg_description system catalog:

http://www.postgresql.org/docs/8.2/static/catalog-pg-description.html

-------------------------------------------------------------
http://www.elsasoft.org

Show quoted text

On Jan 29, 2:40 pm, "Timasmith" <timasm...@hotmail.com> wrote:

Hi,

What query can I run to get the comments on my table columns using
SQL?

thanks

Tim

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jesse (#1)

google@jessehersch.fastmail.fm writes:

On Jan 29, 2:40 pm, "Timasmith" <timasm...@hotmail.com> wrote:

What query can I run to get the comments on my table columns using
SQL?

check out the pg_description system catalog:
http://www.postgresql.org/docs/8.2/static/catalog-pg-description.html

Also see obj_description() and friends, which are basically wrappers
for queries on that catalog:
http://www.postgresql.org/docs/8.2/static/functions-info.html#FUNCTIONS-INFO-COMMENT-TABLE

regards, tom lane