]> granicus.if.org Git - postgresql/commit
Unwind some workarounds for lack of portable int64 format specifier
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 6 Jun 2019 12:14:29 +0000 (14:14 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 4 Jul 2019 15:01:43 +0000 (17:01 +0200)
commit6a1cd8b9236dcfa91b40af3a8337859e16ba7113
treed28df515cafc7354c03588285edf9b1e7ad7656d
parent7b925e12703652fef63a2fbbb28d3407b2971d6e
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%40mail.gmail.com
src/backend/access/transam/xlogreader.c
src/backend/replication/basebackup.c
src/bin/pg_controldata/pg_controldata.c
src/bin/pg_resetwal/pg_resetwal.c
src/bin/pg_rewind/libpq_fetch.c
src/bin/pg_test_timing/pg_test_timing.c