Search Postgresql Archives

Re: how to amend SQL standard to add comments?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 6, 2012 at 10:49 AM, Thomas Kellerer <spam_eater@xxxxxxx> wrote:
>
> You can use multi-line comments with /* .. */ to send this information to
> the server:
>
> SELECT /* Query Author: Bob Programmer.
>          Purpose: Pull the student ID number, we'll need it to enroll the
> student for classes */
>     STUDENT_ID
> from STUDENTS
> WHERE LAST_NAME = 'Smith' and FIRST_NAME = 'Joe';

Thank you!!!!  Perfect.  Documenting queries is going to improve our system
tremendously.  Thank you so much, Thomas!


On Sun, May 6, 2012 at 12:05 PM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
> Quite aside from the fact that the standard already has two perfectly
> good comment syntaxes

My bad.  I tested using psql and --, and when I saw that the comment was
not even sent to the database (using tcpdump), I assumed /* */ would behave
the same.

Thank you for letting me know about %a in  log_line_prefix to log the
application_name.  It's not available in 8.4 but I look forward to using it
after we upgrade to 9 later this year.

> (2) "These comments will be thrown away by the database client" ... how
> many cases have you checked?

Only psql.

Sorry for the arrogance of my original post.  I was a bit tired and agitated.

Thank you very much for the help!  Made my day.  What a great group.

Yours fondly,
Aleksey

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux