Re: When to use COMMENT vs -- - Mailing list pgsql-general

From Pavel Stehule
Subject Re: When to use COMMENT vs --
Date
Msg-id CAFj8pRBVh+Drmv6ZsnB72PTn9ct7WJo=j7m8ZmyMQ7iRGVsQUA@mail.gmail.com
Whole thread Raw
In response to When to use COMMENT vs --  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general


2016-12-07 16:57 GMT+01:00 Rich Shepard <rshepard@appl-ecosys.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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: When to use COMMENT vs --
Next
From: Karsten Hilbert
Date:
Subject: Re: When to use COMMENT vs --