From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: INT64_FORMAT in translatable strings |
Date: | 2021-04-22 13:29:46 |
Message-ID: | 946959.1619098186@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Julien Rouhaud <rjuju123(at)gmail(dot)com> writes:
> On Thu, Apr 22, 2021 at 07:49:23PM +0900, Michael Paquier wrote:
>> May I ask why you are using "unsigned long long int" rather uint64?
> My understanding is that it's the project standard. See e.g.
> https://www.postgresql.org/message-id/1730584.1617836485@sss.pgh.pa.us
Indeed, using %lld, %llu, etc with a matching cast to "long long" or
"unsigned long long" is the approved way. Don't use [u]int64 because
that does not necessarily match these format specs. It's probably
physically compatible, but that won't stop pickier compilers from
nagging about a format mismatch.
But what I thought Michael was griping about is the use of "int",
which is a noise word here. Either "long long int" or "long long"
will work, but I think we've preferred the latter because shorter.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2021-04-22 13:42:14 | Re: wal stats questions |
Previous Message | Daniil Zakhlystov | 2021-04-22 13:04:05 | Re: libpq compression |