question about sql comments in postgresql server logs

From: Alan Stange <stange(at)rentec(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: question about sql comments in postgresql server logs
Date: 2021-08-06 19:08:34
Message-ID: f6d37943-cd3a-17bf-476f-b2e0e6058c6d@rentec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

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.

Is there some way can get the statement as sent to the server emitted
into the log file in a case like this?   I looked through the server
documentation and don't see an option that would clearly alter this
behavior.

Thank you,

Alan

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Clarke 2021-08-06 19:10:45 Re: question about sql comments in postgresql server logs
Previous Message Reid Thompson 2021-08-06 18:27:37 Re: pgcrypto - real life examples to encrypt / decrypt