Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mC5Cz-0003J5-5m for pgsql-general@arkaria.postgresql.org; Fri, 06 Aug 2021 19:08:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mC5Cx-0002WC-PC for pgsql-general@arkaria.postgresql.org; Fri, 06 Aug 2021 19:08:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mC5Cx-0002R9-1D for pgsql-general@lists.postgresql.org; Fri, 06 Aug 2021 19:08:39 +0000 Received: from mx1-es.rentec.com ([216.223.240.6]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mC5Ct-0007Mg-LF for pgsql-general@lists.postgresql.org; Fri, 06 Aug 2021 19:08:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=rentec.com; i=@rentec.com; q=dns/txt; s=rtc081020; t=1628276915; x=1659812915; h=to:from:subject:message-id:date:mime-version: content-transfer-encoding; bh=syvV0ZH0slwX9QnUSpN0CYbEhoYv9why5xlylX+p7Ys=; b=V3xYX31gQr5/38YLavvgZoagLs3InM98W0w3SBDXSgzcyid0mDPyZ387 7W4bCJvl2qTl+YsCY51MzP77LiizhfVqsQ4r72T6AWIHnr1Ky2n7fo29G qoDdoSMACFlQNt46kg3gJG8ID9kMC0BsvvGko4/vV7WR7w76Lo/ZLVVhM a5lzXmLDJppsBZNewcMj8xVwYovgQ4wCWHgW5VJMUxCCjxE3CLbShkb2+ xZvTtCdWc9dbnefJq/bB2zFmEvIt+9ROzO/r4UYNlre4GXO0hl5LmIkqN wd47ISjeeK2IH4xyOukBDDI75m28J5rOKKdB4I3SxXp91vpTmvvuPUpT+ w==; To: pgsql-general@lists.postgresql.org From: Alan Stange Subject: question about sql comments in postgresql server logs Message-ID: Date: Fri, 6 Aug 2021 15:08:34 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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