Adding column comment to information_schema.columns - Mailing list pgsql-hackers

From Justin Clift
Subject Adding column comment to information_schema.columns
Date
Msg-id 40E37E3F.2050400@telstra.net
Whole thread Raw
Responses Re: Adding column comment to information_schema.columns  (Dennis Bjorklund <db@zigo.dhs.org>)
Re: Adding column comment to information_schema.columns  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Re: Adding column comment to information_schema.columns  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi all,

Not sure how worthwhile others will find this small patch (to CVS HEAD),
but we found it useful.  It adds the column comments to the
information_schema.columns view.

Hope it's useful.

:-)

Regards and best wishes,

Justin Clift
*** information_schema.sql.orig    2004-07-01 11:59:26.000000000 +1000
--- information_schema.sql    2004-07-01 12:33:01.000000000 +1000
***************
*** 442,448 ****

             CAST(null AS cardinal_number) AS maximum_cardinality,
             CAST(a.attnum AS sql_identifier) AS dtd_identifier,
!            CAST('NO' AS character_data) AS is_self_referencing

      FROM (pg_attribute a LEFT JOIN pg_attrdef ad ON attrelid = adrelid AND attnum = adnum),
           pg_class c, pg_namespace nc, pg_user u,
--- 442,450 ----

             CAST(null AS cardinal_number) AS maximum_cardinality,
             CAST(a.attnum AS sql_identifier) AS dtd_identifier,
!            CAST('NO' AS character_data) AS is_self_referencing,
!
!            col_description(a.attrelid, a.attnum) AS column_comment

      FROM (pg_attribute a LEFT JOIN pg_attrdef ad ON attrelid = adrelid AND attnum = adnum),
           pg_class c, pg_namespace nc, pg_user u,

pgsql-hackers by date:

Previous
From: Joseph Shraibman
Date:
Subject: suggestion: set default statistics to 100 for numerics
Next
From: Joe Conway
Date:
Subject: compile warnings