Andres Freund <andres@anarazel.de> writes:
> On May 22, 2019 7:39:41 AM PDT, Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
>> On 2019-04-29 19:32, Tom Lane wrote:
>>> Another problem is that while "%lu" format specifiers are portable,
>>> INT64_FORMAT is a *big* pain, not least because you can't put it into
>>> translatable strings without causing problems. To the extent that
>>> we could go over to "%zu" instead, maybe this could be finessed,
>>> but blind "s/long/int64/g" isn't going to be any fun.
>> Since we control our own snprintf now, this could probably be addressed
>> somehow, right?
> z is for size_t though? Not immediately first how It'd help us?
Yeah, z doesn't reliably translate to int64 either, so it's only useful
when the number you're trying to print is a memory object size.
I don't really see how controlling snprintf is enough to get somewhere
on this. Sure we could invent some new always-64-bit length modifier
and teach snprintf.c about it, but none of the other tools we use
would know about it. I don't want to give up compiler cross-checking
of printf formats, do you?
regards, tom lane