[GENERAL] How can I select a comment on a column?

2007-03-26 Thread Serguei Pronkine
Hi community, I'd like to retrieve comments on tables an columns by table name and column name. The posting by Tom Lane tgl ( at ) sss ( dot ) pgh ( dot ) pa ( dot ) us http://archives.postgresql.org/pgsql-novice/2004-01/msg00180.php?adv=1 says how to select comment on a column. regression=#

Re: [GENERAL] How can I select a comment on a column?

2007-03-26 Thread Michael Fuhr
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: