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