Re: When to use COMMENT vs --

Поиск
Список
Период
Сортировка
От Chris Travers
Тема Re: When to use COMMENT vs --
Дата
Msg-id CAKt_Zfs3+Y41UUOAC9YXZqfD5UhBeKsttrao37fEiThk+ueJEg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: When to use COMMENT vs --  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Ответы Re: When to use COMMENT vs --
Список pgsql-general

On Dec 7, 2016 5:07 PM, "Karsten Hilbert" <Karsten.Hilbert@gmx.net> wrote:
>
> On Wed, Dec 07, 2016 at 07:57:54AM -0800, Rich Shepard wrote:
>
> >   I have used '-- ' to enter comments about tables or columns and am curious
> > about the value of storing comments in tables using the COMMENT key word.
> > When is the latter more appropriate than the former?
>
> "--" only means "comment" to SQL code (such as in scripts).
> PostgreSQL itself simply ignores it.
>
> OTOH, using "comment on ... is ..." tells PostgreSQL to
> _store_ a comment on a database object for later retrieval.
>

This also means that tools like pg_autodoc can include it as part of the generated documentation.
> Karsten
> --
> GPG key ID E4071346 @ eu.pool.sks-keyservers.net
> E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

В списке pgsql-general по дате отправления:

Предыдущее
От: dixita4
Дата:
Сообщение: CLOB Data Export from DB2 to Postgres
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: high transaction rate