There was a thread in January of 2012 where we discussed the idea of
pulling system table/column name descriptions from the SGML docs and
creating SQL comments for them:
http://archives.postgresql.org/pgsql-hackers/2012-01/msg00837.php
Magnus didn't seem to like the idea:
http://archives.postgresql.org/pgsql-hackers/2012-01/msg00848.php
Well, I'd expect some of those columns to get (at least over time)significantly more detailed information than they
havenow. Certainlymore than you'd put in comments in the catalogs. And having some sortof combination there seems to
overcomplicatethings...
I think the idea of having the short descriptions in SQL and longer ones
in SGML is not maintainable. One idea would be to clip the SQL
description to be no longer than a specified number of characters, with
proper word break detection.
Here is how psql displays column and table comments:
test=> create table test(x int);CREATE TABLEtest=> comment on column test.x IS 'wow';COMMENTtest=> \d+ test
Table "public.test" Column | Type | Modifiers | Storage | Stats target |
Description--------+---------+-----------+---------+--------------+-------------x | integer | | plain
| | wowHas OIDs: no
test=> comment on table test is 'yikes';COMMENTtest=> \d+ List of relations Schema | Name | Type |
Owner | Size | Description--------+------+-------+----------+---------+------------- public | test | table |
postgres| 0 bytes | yikes(1 row)
Should I continue working on this patch?
-- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB
http://enterprisedb.com
+ It's impossible for everything to be true. +