Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLbrh-0005F6-6o for pgsql-hackers@arkaria.postgresql.org; Wed, 23 May 2018 22:04:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fLbre-0004n9-JP for pgsql-hackers@arkaria.postgresql.org; Wed, 23 May 2018 22:04:10 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLbre-0004n0-3j for pgsql-hackers@lists.postgresql.org; Wed, 23 May 2018 22:04:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fLbrb-0004FO-D9 for pgsql-hackers@lists.postgresql.org; Wed, 23 May 2018 22:04:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w4NM44cx012706; Wed, 23 May 2018 18:04:04 -0400 From: Tom Lane To: Alvaro Herrera cc: pgsql-hackers@lists.postgresql.org Subject: Re: printf format selection vs. reality In-reply-to: <8383.1527107335@sss.pgh.pa.us> References: <20180523201046.4znqfw52bmr6o3gr@alvherre.pgsql> <8383.1527107335@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 23 May 2018 16:28:55 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12704.1527113044.1@sss.pgh.pa.us> Date: Wed, 23 May 2018 18:04:04 -0400 Message-ID: <12705.1527113044@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Sigh, I'm an idiot. I forgot that USE_REPL_SNPRINTF doesn't just replace snprintf, it replaces the entire *printf family; see port.h lines 137ff. So actually we're OK as far as these %z and argument-reordering concerns go. Maybe the comments in configure could use a bit of work though. There's maybe also an argument for reverting b929614f5, because actually that code did do something useful, ie allow us to work on platforms without %ll. But I'm inclined to leave that alone; it's an extra configure test to detect a case that probably no longer occurs in the wild. Moreover, since %ll and %z are both C99-isms, and the former had considerable currency even before C99 (evidence: gaur/pademelon) it's pretty hard to credit that a platform's *printf would fail the %ll test yet pass the %z test. So I think we're likely OK without it, even on dinosaur platforms. regards, tom lane