Re: how to amend SQL standard to add comments?

Поиск
Список
Период
Сортировка
От Aleksey Tsalolikhin
Тема Re: how to amend SQL standard to add comments?
Дата
Msg-id CA+jMWocmSLQyG3pZdGfxo5_+EeS+UfFw7HDSgSnCgDa-LnKYBg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: how to amend SQL standard to add comments?  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
On Sun, May 6, 2012 at 10:49 AM, Thomas Kellerer <spam_eater@gmx.net> 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@sss.pgh.pa.us> 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

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: 2 machines, same database, same query, 10 times slower?
Следующее
От: Darren Duncan
Дата:
Сообщение: how best to see session data in triggers, or auditing methods