From: Thomas Kellerer <shammat@gmx.net>
To: pgsql-jdbc@lists.postgresql.org
Subject: Re: question about sql comments
Date: Sat, 7 Aug 2021 07:34:20 +0200
Message-ID: <8ee165dd-0dd5-d85d-cc88-12210a81f38e@gmx.net> (raw)
In-Reply-To: <1607505e-776d-0f44-9f8e-72c9f7ba1493@rentec.com>
References: <1607505e-776d-0f44-9f8e-72c9f7ba1493@rentec.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: shammat@gmx.net
Subject: Re: question about sql comments
In-Reply-To: <8ee165dd-0dd5-d85d-cc88-12210a81f38e@gmx.net>
References: <1607505e-776d-0f44-9f8e-72c9f7ba1493@rentec.com> <8ee165dd-0dd5-d85d-cc88-12210a81f38e@gmx.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox