Re: Portability concerns over pq_sendbyte? - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Portability concerns over pq_sendbyte?
Date
Msg-id 20180627065149.tdczk7my43mekh7g@alap3.anarazel.de
Whole thread Raw
In response to Re: Portability concerns over pq_sendbyte?  (Andres Freund <andres@anarazel.de>)
Responses Re: Portability concerns over pq_sendbyte?
List pgsql-hackers
Hi,

On 2018-06-14 13:25:30 -0700, Andres Freund wrote:
> 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.

Nobody argued against, thus I've pushed a patch doing so.

Looking at surrounding code I found a few more oddities, but of older
vintage:
- pq_sendfloat4 uses an uint32 in the union, but float8 uses a int64.
- same with pq_getmsgfloat[48]
- pq_getmsgint64 returns a int64, should probably also be uint64

Given they're practially harmless I'm inclined to only fix them in
master?

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: postgresql_fdw doesn't handle defaults correctly
Next
From: Amit Langote
Date:
Subject: Re: [HACKERS] advanced partition matching algorithm forpartition-wise join