Re: Idea: Comments on system catalogs?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>
Cc: Dawid Kuroczko <qnex42(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Idea: Comments on system catalogs?
Date: 2008-03-07 14:51:43
Message-ID: 200803071451.m27Ephn26659@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jim C. Nasby wrote:
-- Start of PGP signed section.
> On Wed, Jul 04, 2007 at 01:03:20PM +0200, Dawid Kuroczko wrote:
> > Hello.
> >
> > I think it could be a nice idea to put descriptions from
> > http://www.postgresql.org/docs/8.2/static/catalogs.html
> > into system catalogs itself. I.e., make a bunch of
> >
> > COMMENT ON COLUMN pg_class.relname
> > IS 'Name of the table, index, view, etc.';
> > ...
> > COMMENT ON COLUMN pg_class.relkind
> > IS 'r = ordinary table, i = index, S = sequence, v = view, c =
> > composite type, t = TOAST table';
> >
> > and so on.
> >
> > I think it could be helpful, when you're writing your own selects
> > on system catalogs.
> >
> > Perhaps it could be optional (as a contrib .sql file).
> >
> > If you like the idea, I could prepare a script which will
> > convert documentation into .sql file with series of
> > COMMENT ON .. IS ...;
>
> Actually, this does exist for some things in the catalog; I suspect it
> just wasn't done in the past (perhaps Postgres didn't originally have
> comments). I think it would be a useful addition. But I think it'd need
> to be more than just a .sql file (initdb would probably need to be
> modified). Ideally, we'd be able to suck the info out of the appropriate
> .sgml files.

Added to TODO:

* Add comments on system tables/columns using the information in
catalogs.sgml

Ideally the information would be pulled from the SGML file
automatically.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-03-07 14:53:24 Re: Commitfest status
Previous Message Anton Melser 2008-03-07 14:45:07 Re: shared_buffers and shmmax what are the max recommended values?