Incorrect GetDatum() macros not match with SQL function types

Started by Michael Paquier3 months ago2 messageshackers
Jump to latest
#1Michael Paquier
michael@paquier.xyz

Hi all,
(Aleksander in CC, who has authored some of them in pageinspect.)

While looking at the business in [1]/messages/by-id/CAJ7c6TMcGu8qmRe1gZfJ-gOzVnZq-t=fwn-UuyStx1w6ZyydMw@mail.gmail.com -- Michael, I have noticed a bunch of areas
in the code base where the *GetDatum() macros used do not match with
the data type of the SQL functions they relate to, leading me to the
attached.

I am creating a new thread for clarity, as the patch was hidden in the
middle of a different discussion.

When it comes to the numbers touched here, the signedness should not
matter, so this most likely a cleanup worth doing for v20, not v19.

Thanks,

[1]: /messages/by-id/CAJ7c6TMcGu8qmRe1gZfJ-gOzVnZq-t=fwn-UuyStx1w6ZyydMw@mail.gmail.com -- Michael
--
Michael

Attachments:

0001-Fix-more-Datum-conversion-inconsistencies.patchtext/plain; charset=us-asciiDownload+47-48
#2Michael Paquier
michael@paquier.xyz
In reply to: Michael Paquier (#1)
Re: Incorrect GetDatum() macros not match with SQL function types

On Thu, Apr 30, 2026 at 02:46:17PM +0900, Michael Paquier wrote:

I am creating a new thread for clarity, as the patch was hidden in the
middle of a different discussion.

When it comes to the numbers touched here, the signedness should not
matter, so this most likely a cleanup worth doing for v20, not v19.

I had this patch in my bucket of things for a couple of weeks, and
applied now as of d92e98340fcb.
--
Michael