pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: John Naylor <john.naylor@enterprisedb.com>
Cc: John Naylor <john.naylor@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Refer to replication origin roident as "ID" in user facing messa
Date: Mon, 22 Aug 2022 16:35:27 +0200
Message-ID: <31e63649-0355-7088-831e-b07d5f908a8c@enterprisedb.com> (raw)
In-Reply-To: <CAFBsxsEMiQA-HbhcPT=_nqLhAb6YX0mhxr+WQFcuqeMznkew_g@mail.gmail.com>
References: <E1oOUz7-0002oD-6m@gemulon.postgresql.org>
	<b70cd33b-82fb-c2d6-442c-5f719079ff91@enterprisedb.com>
	<CAFBsxsEMiQA-HbhcPT=_nqLhAb6YX0mhxr+WQFcuqeMznkew_g@mail.gmail.com>

On 19.08.22 03:06, John Naylor wrote:
> On Thu, Aug 18, 2022 at 4:49 PM Peter Eisentraut
> <peter.eisentraut@enterprisedb.com> wrote:
>>
>> On 18.08.22 04:10, John Naylor wrote:
>>> While at it, most format strings already use %u, so for consintency
>>> change the remaining stragglers using %d.
>>
>> This is incorrect.  Replication origin IDs are of type uint16, which
>> gets promoted to int in a variable arguments list, so %d is the correct
>> placeholder.
> 
> I would think that for uint16, either %d or %u would have the same
> result. Is there some other consideration I'm not aware of?

Every once in a while, I build PostgreSQL with -Wformat-signedness, 
which often finds issues with OIDs and timeline IDs printed with the 
wrong placeholder.  There is a lot of noise to skip past when doing 
that, but in the long run it would be nice if we didn't add more of it.






view thread (6+ messages)  latest in thread

Message-ID: <31e63649-0355-7088-831e-b07d5f908a8c@enterprisedb.com>
Permalink:  ../31e63649-0355-7088-831e-b07d5f908a8c@enterprisedb.com/
Also on:    postgresql.org/message-id/31e63649-0355-7088-831e-b07d5f908a8c@enterprisedb.com

 · 

reply

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@enterprisedb.com, john.naylor@enterprisedb.com, john.naylor@postgresql.org
  Subject: Re: pgsql: Refer to replication origin roident as "ID" in user facing messa
  In-Reply-To: <31e63649-0355-7088-831e-b07d5f908a8c@enterprisedb.com>
  References: <E1oOUz7-0002oD-6m@gemulon.postgresql.org> <b70cd33b-82fb-c2d6-442c-5f719079ff91@enterprisedb.com> <CAFBsxsEMiQA-HbhcPT=_nqLhAb6YX0mhxr+WQFcuqeMznkew_g@mail.gmail.com> <31e63649-0355-7088-831e-b07d5f908a8c@enterprisedb.com>

* 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