From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
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 22:21:29 |
Message-ID: | 20180613222129.GA1597@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 13, 2018 at 11:53:21AM -0700, Andres Freund wrote:
> 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 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?
Yeah, actually that would be assuming that many modules use it, but that
does not seem to be much the case, at least from github's point of view.
>> And also pq_sendint64 needs to be kept around for compatibility.
>
> :(. Wonder if it's better to just break people's code.
Indeed. At least breaking compilation has the advantage of making
people directly aware of the change and think hopefully about them.
A research on github shows a bunch of people having copied of pqformat.h
as there are a bunch of copies of Postgres so with this much noise it is
not easy to find out what would be broken. In-core contrib and test
modules don't make use of those interfaces as well, except for hstore.
So that could be acceptable.
For pq_sendint there are many matches with printsimple.c.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Vik Fearing | 2018-06-13 22:34:54 | Logging transaction IDs for DDL. |
Previous Message | Peter Geoghegan | 2018-06-13 22:00:33 | Re: Locking B-tree leafs immediately in exclusive mode |