From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Unwind some workarounds for lack of portable int64 format specif
Date: Thu, 04 Jul 2019 15:02:41 +0000
Message-ID: <E1hj3Fx-0005qW-P5@gemulon.postgresql.org> (raw)
Unwind some workarounds for lack of portable int64 format specifier
Because there is no portable int64/uint64 format specifier and we
can't stick macros like INT64_FORMAT into the middle of a translatable
string, we have been using various workarounds that put the number to
be printed into a string buffer first. Now that we always use our own
sprintf(), we can rely on %lld and %llu to work, so we can use those.
This patch undoes this workaround in a few places where it was
egregiously verbose.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/CAH2-Wz%3DWbNxc5ob5NJ9yqo2RMJ0q4HXDS30GVCobeCvC9A1L9A%40m...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6a1cd8b9236dcfa91b40af3a8337859e16ba7113
Modified Files
--------------
src/backend/access/transam/xlogreader.c | 16 +++-------------
src/backend/replication/basebackup.c | 11 +++--------
src/bin/pg_controldata/pg_controldata.c | 12 ++----------
src/bin/pg_resetwal/pg_resetwal.c | 13 ++-----------
src/bin/pg_rewind/libpq_fetch.c | 10 ++--------
src/bin/pg_test_timing/pg_test_timing.c | 12 +++---------
6 files changed, 15 insertions(+), 59 deletions(-)
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org
Subject: Re: pgsql: Unwind some workarounds for lack of portable int64 format specif
In-Reply-To: <E1hj3Fx-0005qW-P5@gemulon.postgresql.org>
References: <E1hj3Fx-0005qW-P5@gemulon.postgresql.org>
* 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