Re: Making type Datum be 8 bytes everywhere - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Making type Datum be 8 bytes everywhere
Date
Msg-id aIv8L_acvtJBWkC5@paquier.xyz
Whole thread Raw
In response to Re: Making type Datum be 8 bytes everywhere  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Jul 31, 2025 at 10:27:37AM -0400, Tom Lane wrote:
> Peter Eisentraut <peter@eisentraut.org> writes:
>> In my patch, I just added the missing DatumGetPointer() calls, which
>> seemed easy enough.
>
> I had an earlier patch version that also did that, but it seemed
> kind of verbose to me: adding "_D" is much shorter than adding
> "DatumGetPointer()", and fewer parens seems good for readability.

I have mixed feelings about that, but as long as one is easily able to
detect that they should not pass a Datum.  At the end, I'm kind of
OK-ish with the addition of the _D flavors to have a shortcut for the
VARDATA/DatumGetPointer() patterns, as an option.  So I'd put +0.5.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Datum as struct
Next
From: SATYANARAYANA NARLAPURAM
Date:
Subject: Add CHECK_FOR_INTERRUPTS in pg_buffercache_pages while scanning the buffers