Re: Adding comments for system table/column names

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: Adding comments for system table/column names
Date: 2012-10-13 03:56:19
Message-ID: CAFcNs+q4kLbB3kOyYSLTbb62oZhLuv17d3ZQ2ObFzzOQzyPL3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2012/10/12 Bruce Momjian <bruce(at)momjian(dot)us>

> 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 have now.
> Certainly
> more than you'd put in comments in the catalogs. And having some
> sort
> of combination there seems to overcomplicate things...
>
> 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 TABLE
> test=> comment on column test.x IS 'wow';
> COMMENT
> test=> \d+ test
> Table "public.test"
> Column | Type | Modifiers | Storage | Stats target |
> Description
>
> --------+---------+-----------+---------+--------------+-------------
> x | integer | | plain | | wow
> Has OIDs: no
>
> test=> comment on table test is 'yikes';
> COMMENT
> test=> \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?
>
>
Hi all,

If it can help, Euler wrote about that some time ago in your blog [1].

Regards,

[1] http://eulerto.blogspot.com.br/2010/11/comment-on-catalog-tables.html

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Blog sobre TI: http://fabriziomello.blogspot.com
>> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Darren Duncan 2012-10-13 04:00:08 Re: Successor of MD5 authentication, let's use SCRAM
Previous Message Stephen Frost 2012-10-13 02:53:10 Re: Potential autovacuum optimization: new tables