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 1lMZA8-0005MQ-OF for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Mar 2021 16:36:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lMZA7-0004ax-E1 for pgsql-hackers@arkaria.postgresql.org; Wed, 17 Mar 2021 16:36:47 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMZA6-0004ap-LQ for pgsql-hackers@lists.postgresql.org; Wed, 17 Mar 2021 16:36:47 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMZA2-0006Ee-3y for pgsql-hackers@lists.postgresql.org; Wed, 17 Mar 2021 16:36:46 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 349FB1DD2; Wed, 17 Mar 2021 12:36:38 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 17 Mar 2021 12:36:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=j34RlbSZvvo55Lqwj0CHLcNe7W3TF/3M1lhC7L6BXNM=; b=fzuMCgFc 19E9T4lQD272rKeTcaFPAvMRng2QWhHepOGIpTAQQtQbKPhJrcs6VStGZGhhZ116 3L4V3TDlg/LrsX2nm7t2y/Iay2OW28H3Q7ogA6eV+UBWI3BM4QRr2WcRWDvWMf5a VVzQvK7MDZYk9uwhYyaWGCVEOrOu2rC41S7to11GmlWbRrtPtKnhcgqcgHC08VRN IFYeTy+Hw07T6BktT7yd5xhG1z6Z3JmeT4oE6T15LbWZNxhu9jlNhaMO/wKMCI4A l+C6k3NvnGCbkcp0MOEcSu9TpxJdulxFyHCM+6A+76mvOP3U3i0mYLqN5uWVzP5i Bc2XNA61iaP37g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudefgedgleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugfgjggfsehtke ertddtredunecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhr vgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpeeufffhjeeiue euffegvddukeegledtveeivdeiueefieeivefgteehueefteehvdenucfkphepudeltddr leehrdduledrleehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id 72603108005F; Wed, 17 Mar 2021 12:36:35 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 2F5C32A0D43; Wed, 17 Mar 2021 13:36:32 -0300 (-03) Date: Wed, 17 Mar 2021 13:36:32 -0300 From: Alvaro Herrera To: "iwata.aya@fujitsu.com" Cc: "tsunakawa.takay@fujitsu.com" , 'Tom Lane' , 'Kyotaro Horiguchi' , "k.jamison@fujitsu.com" , "pgsql-hackers@lists.postgresql.org" Subject: Re: libpq debug log Message-ID: <20210317163632.GA19151@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello In pqTraceOutputString(), you can use the return value from fprintf to move the cursor -- no need to count chars. I still think that the message-type specific functions should print the message type, rather than having the string arrays. -- Álvaro Herrera Valdivia, Chile "La gente vulgar sólo piensa en pasar el tiempo; el que tiene talento, en aprovecharlo"