Re: pgsql: Refer to replication origin roident as "ID" in user facing messa

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: pgsql: Refer to replication origin roident as "ID" in user facing messa
Дата
Msg-id 31e63649-0355-7088-831e-b07d5f908a8c@enterprisedb.com
обсуждение исходный текст
Ответ на Re: pgsql: Refer to replication origin roident as "ID" in user facing messa  (John Naylor <john.naylor@enterprisedb.com>)
Ответы Re: pgsql: Refer to replication origin roident as "ID" in user facing messa  (John Naylor <john.naylor@enterprisedb.com>)
Список pgsql-committers
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.




В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Fix assertion failure in CREATE DATABASE
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Make role grant system more consistent with other privileges.