Re: question about sql comments in postgresql server logs

Поиск
Список
Период
Сортировка
От Alan Stange
Тема Re: question about sql comments in postgresql server logs
Дата
Msg-id 93d7235c-06be-9646-6b9a-36d1c7ad6e88@rentec.com
обсуждение исходный текст
Ответ на Re: question about sql comments in postgresql server logs  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On 8/6/21 3:14 PM, Tom Lane wrote:
> Alan Stange <stange@rentec.com> writes:
>> In order to track down some bugs, we thought it would be useful to
>> append some comments to the sql being sent to postgresql like this:
>>     select foo from bar   -- a comment with some metadata
>> however, the postgresql server was not including the appended comment in
>> the log file.
>> If we instead sent
>>     select foo from /* a comment with some metadata */ bar
>> then the comment was included in the server log file as we had hoped.
> If memory serves, this is a psql behavior not the server's.
> I counsel using /* ... */ comments for the purpose.

Thank you Tom,

I tried both psql and connecting through jdbc and both had the same
behavior, so assumed this was something in the server.   We will go
with  /* */ to resolve the immediate problem, and will ask on the jdbc
mailing list about this.  

Being able to freely append some comments for debugging/tracking
purposes in the server logs seems like a useful feature.

Thank you,

Alan



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: question about sql comments in postgresql server logs
Следующее
От: "Theodore M Rolle, Jr."
Дата:
Сообщение: Re: pgcrypto - real life examples to encrypt / decrypt