Re: pg_description - Mailing list pgsql-general

From Mike Mascari
Subject Re: pg_description
Date
Msg-id 39466724.260B6BCF@mascari.com
Whole thread Raw
In response to Book nearing final form  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Installing DBD::Pg  ("Sean Carmody" <sean@categoricalsolutions.com.au>)
List pgsql-general
Karl DeBisschop wrote:
>
> I'm hoping to use the pg_description table (in 7.0.2) to make a few
> databases
> more decipherable to local developers.
>
> Unfortunately, the only way I can see to put data in is by directly
> updating
> the pg_description table.  Is there any documenation for possible
> alternative
> procedures? I was unfortunately unable to find any.
>
> What I would like would be something like:
>
>   ALTER TABLE foo (ADD|UPDATE) DESCRIPTION 'Some Text Here';
>
> and of course the ability set change psql setting to display
> descriptions for
> tables when I do '\dt'
>
> Does anything like this exist?  Is it planned?

To add descriptions:

COMMENT ON TABLE foo IS 'Some Text Here';

To drop the descriptions:

COMMENT ON TABLE foo IS NULL;

\h COMMENT should give yo all the details. Naturally, the
comments are dropped when the associated object is dropped. You
can comment on any PostgreSQL object and the comments are dumped
with pg_dump.

Hope that helps,

Mike Mascari

pgsql-general by date:

Previous
From: Karl DeBisschop
Date:
Subject: pg_description
Next
From: Jurgen Defurne
Date:
Subject: Re: DBI problems with Pg