Re: MinGW / Windows / printf format specifiers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: MinGW / Windows / printf format specifiers
Date
Msg-id 12457.1455889943@sss.pgh.pa.us
Whole thread Raw
In response to Re: MinGW / Windows / printf format specifiers  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
Craig Ringer <craig@2ndquadrant.com> writes:
> On 19 February 2016 at 12:15, Chapman Flack <chap@anastigmatix.net> wrote:
>> Have issues like this been dealt with in PostgreSQL code before, and did
>> a favorite approach emerge?

> INT64_FORMAT and UINT64_FORMAT

Yeah.  Note in particular the convention to avoid using those in
translatable strings.  Where necessary, we manage that by using
sprintf(INT64_FORMAT) into a buffer variable and then printing
the buffer with %s in the translatable message.  Grotty, but there
seems no other way that doesn't result in platform-dependent
translatable strings.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Typo in bufmgr.c that result in waste of memory
Next
From: David Steele
Date:
Subject: Re: PostgreSQL Audit Extension