Re: pg_description

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема Re: pg_description
Дата
Msg-id 39466724.260B6BCF@mascari.com
обсуждение исходный текст
Ответ на Book nearing final form  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Installing DBD::Pg
Список 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 по дате отправления:

Предыдущее
От: Karl DeBisschop
Дата:
Сообщение: pg_description
Следующее
От: Jurgen Defurne
Дата:
Сообщение: Re: DBI problems with Pg