From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: printf format selection vs. reality
Date: Wed, 23 May 2018 18:04:04 -0400
Message-ID: <12705.1527113044@sss.pgh.pa.us> (raw)
In-Reply-To: <8383.1527107335@sss.pgh.pa.us>
References: <20180523201046.4znqfw52bmr6o3gr@alvherre.pgsql>
<8383.1527107335@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
Subject: Re: printf format selection vs. reality
In-Reply-To: <12705.1527113044@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox