Re: question about sql comments

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: question about sql comments
Дата
Msg-id 8ee165dd-0dd5-d85d-cc88-12210a81f38e@gmx.net
обсуждение исходный текст
Ответ на question about sql comments  (Alan Stange <stange@rentec.com>)
Список pgsql-jdbc
Alan Stange schrieb am 06.08.2021 um 22:31:
> Hello all,
>
> 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.

The ; ends the statement, so the comment you sent actually belongs to
the _next_ statement.

Did you try adding the single line comment before the statement?

     -- a comment
     select foo from bar;


Thomas



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

Предыдущее
От: Alan Stange
Дата:
Сообщение: question about sql comments
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Are these bugs?