Re: Define DatumGetInt8 function.

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Aleksander Alekseev <aleksander@tigerdata.com>, pgsql-hackers <pgsql-hackers@postgresql.org>, Kirill Reshke <reshkekirill@gmail.com>, David Rowley <dgrowleyml@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Heikki Linnakangas <hlinnaka@iki.fi>, Nathan Bossart <nathandbossart@gmail.com>, melanieplageman@gmail.com
Date: 2026-04-30T05:28:04Z
Lists: pgsql-hackers
On Tue, Apr 28, 2026 at 02:13:31PM +0900, Michael Paquier wrote:
> In short, it took me some time to put some order into all that,
> finishing with the attached patch set.  0001 is the minimum for v19,
> that reverts 6dcfac9696cb so as we have more *GetDatum() matching with
> the types in the SQL functions.  That would take care of the open item
> on top of my head.

This was not completely right after a second look.  6dcfac9696cb did
not get things completely wrong, either, the brin and gist parts of
the changes were right.  I have undone the incorrect bits for now to
address the open item.

> 0002 is a set of fixes that I have spotted while investigating this
> set of issues in depth.  These spots are actually wrong, some of them
> for a long time.  I would be slightly tempted to do something about
> these in v19 rather than wait for v20, as these are somewhat latent
> bugs, to have more consistency across the board.  Has anybody from the
> RMT an opinion to offer?  There is not much urgency in it, still..
> Added the RMT in CC for opinions.

This deserves a different discussion, unrelated to DatumGetInt8().
I'll post that on a separate thread, for v20.
--
Michael

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Adjust some incorrect *GetDatum() macros

  2. Remove Int8GetDatum function