Re: Portability concerns over pq_sendbyte?

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@2ndquadrant.com>, Andrew Gierth <andrew@tao11.riddles.org.uk>, pgsql-hackers@postgresql.org
Date: 2018-06-27T09:40:46Z
Lists: pgsql-hackers
On Tue, Jun 26, 2018 at 11:51:49PM -0700, Andres Freund wrote:
> 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?

Doing those three things on HEAD only looks like a good plan to me.  I
have not spotted more inconsistencies in pqformat.c.
--
Michael

Commits

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