question about sql comments in postgresql server logs - Mailing list pgsql-general

From Alan Stange
Subject question about sql comments in postgresql server logs
Date
Msg-id f6d37943-cd3a-17bf-476f-b2e0e6058c6d@rentec.com
Whole thread Raw
Responses Re: question about sql comments in postgresql server logs  (Tim Clarke <tim.clarke@minerva.info>)
Re: question about sql comments in postgresql server logs  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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





pgsql-general by date:

Previous
From: Reid Thompson
Date:
Subject: Re: pgcrypto - real life examples to encrypt / decrypt
Next
From: Tim Clarke
Date:
Subject: Re: question about sql comments in postgresql server logs