Re: When to use COMMENT vs --

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org >> PG-General Mailing List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: When to use COMMENT vs --
Date: 2016-12-07 16:04:42
Message-ID: CAFj8pRBVh+Drmv6ZsnB72PTn9ct7WJo=j7m8ZmyMQ7iRGVsQUA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2016-12-07 16:57 GMT+01:00 Rich Shepard <rshepard(at)appl-ecosys(dot)com>:

> 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?
>

Description entered with COMMENT statements is persistently saved in
database system catalogue - see table pg_description. You can get the
comment for any database object.

Comments like '--' or '/* ... */ are comments in source code, and they are
just ignored in processing.

Regards

Pavel

>
> TIA,
>
> Rich
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2016-12-07 16:05:56 Re: When to use COMMENT vs --
Previous Message Rich Shepard 2016-12-07 15:57:54 When to use COMMENT vs --