Re: Datum as struct

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Datum as struct
Date: 2025-08-08 20:55:01
Message-ID: 1966078.1754686501@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2025-07-31 16:02:35 +0200, Peter Eisentraut wrote:
>> diff --git a/contrib/ltree/_ltree_gist.c b/contrib/ltree/_ltree_gist.c
>> index 286ad24fbe8..2d71cea7e5a 100644
>> --- a/contrib/ltree/_ltree_gist.c
>> +++ b/contrib/ltree/_ltree_gist.c
>> @@ -84,7 +84,7 @@ _ltree_compress(PG_FUNCTION_ARGS)
>> entry->rel, entry->page,
>> entry->offset, false);
>> }
>> - else if (!LTG_ISALLTRUE(entry->key))
>> + else if (!LTG_ISALLTRUE(entry->key.value))

> This should be DatumGet*(), no?

Indeed. I was just rebasing my 8-byte-Datum patch onto HEAD, and
noted this and one or two other places still missing DatumGetPointer.
I plan to go ahead and commit a cleanup patch with those fixes and
s/(Datum) NULL/(Datum) 0/g as soon as I've finished testing.

FWIW, I don't love the "DummyDatum" name either. Maybe InvalidDatum?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2025-08-08 21:02:46 Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)
Previous Message Jacob Champion 2025-08-08 20:52:09 Re: [PATCH] OAuth: fix performance bug with stuck multiplexer events