Re: Portability concerns over pq_sendbyte?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Portability concerns over pq_sendbyte?
Date: 2018-06-13 18:53:21
Message-ID: 20180613185321.dcvh6vb7fj4f3kl4@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-06-13 14:10:37 +0900, Michael Paquier wrote:
> On Mon, Jun 11, 2018 at 02:25:44PM +0900, Michael Paquier wrote:
> > On Wed, Jun 06, 2018 at 12:27:58PM -0400, Alvaro Herrera wrote:
> >> Do you have an answer to this question? Does anybody else?
> >>
> >> (My guts tell me it'd be better to change these routines to take
> >> unsigned values, without creating extra variants. But guts frequently
> >> misspeak.)
> >
> > My guts are telling me as well to not have more variants.

Agreed.

> > On top of that it seems to me that we'd want to rename any new
> > routines to include "uint" in their name instead of "int", and for
> > compatibility with past code pq_sendint should not be touched.

I'm very doubtful about this one, unless you mean that just the
signature shouldn't be touched. Otherwise we'll just increase code
duplication unnecessarily?

> And also pq_sendint64 needs to be kept around for compatibility.

:(. Wonder if it's better to just break people's code.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2018-06-13 18:54:03 Re: [HACKERS] Optional message to user when terminating/cancelling backend
Previous Message Andres Freund 2018-06-13 18:50:11 Re: Portability concerns over pq_sendbyte?