Re: [HACKERS] taking stdbool.h into use

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Kevin Grittner <kgrittn(at)gmail(dot)com>
Subject: Re: [HACKERS] taking stdbool.h into use
Date: 2018-01-16 06:14:14
Message-ID: 20180116061157.GD2212@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 11, 2018 at 06:40:05PM -0500, Tom Lane wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
>> That leaves the uses in rowtypes.c. Those were introduced as a
>> portability fix by commit 4cbb646334b. I'm curious why these are
>> necessary. The Datums they operate come from heap_deform_tuple(), which
>> gets them from fetchatt(), which does run all pass-by-value values
>> through the very same GET_X_BYTES() macros (until now). I don't see
>> where those dirty upper bits would be coming from.
>
> I don't see it either. I think the actually useful parts of that patch
> were to declare record_image_cmp's result correctly as int rather than
> bool, and to cope with varlena fields of unequal size. Unfortunately
> there seems to be no contemporaneous mailing list discussion, so
> it's not clear what Kevin based this change on.

This was a hotfix after a buildfarm breakage, the base commit being
f566515.

> Want to try reverting the GET_X_BYTES() parts of it and see if the
> buildfarm complains?

So, Peter, are you planning to do so?

> Note if that if we simplify the GetDatum macros, it's possible that
> record_image_cmp would change behavior, since it might now see signed not
> unsigned values depending on whether the casts do sign extension or not.
> Not sure if that'd be a problem.

Based on the patch series in
https://www.postgresql.org/message-id/d86ec1f4-941c-e702-b05a-748ea2e59e9c@2ndquadrant.com,
the next thing that could be shipped is 0003 in my opinion, as 0002 has
already been pushed.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-01-16 06:21:41 Re: [HACKERS] Replication status in logical replication
Previous Message Andrey Borodin 2018-01-16 05:24:31 Re: New gist vacuum.