Re: Portability concerns over pq_sendbyte?

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Michael Paquier <michael@paquier.xyz>, Andrew Gierth <andrew@tao11.riddles.org.uk>, pgsql-hackers@postgresql.org
Date: 2018-06-14T20:25:30Z
Lists: pgsql-hackers
Hi,

On 2018-06-14 16:17:28 -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> > How about not renaming the functions, but just change argument types?

Yea, I'm in favor of this. I don't think the 'u' in there would benefit
us, and the cast from signed to unsigned is well defined, so it's safe
to call the functions with signed input.


> Yeah, I didn't understand why anything else would be on the table.

Because it sounds a bit weird for a function with just 'int' in the name
to take unsigned ints as a parameter? I don't think that's enough
justification to rename everything, but it's not completely crazy either.

> We already changed their arg types for 11, no?

No, not really. We added new functions.

Greetings,

Andres Freund


Commits

  1. Change pqformat.h's integer handling functions to take unsigned integers.