Re: Datum as struct - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Datum as struct
Date
Msg-id 1966078.1754686501@sss.pgh.pa.us
Whole thread Raw
In response to Re: Datum as struct  (Andres Freund <andres@anarazel.de>)
Responses Re: Datum as struct
List pgsql-hackers
Andres Freund <andres@anarazel.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



pgsql-hackers by date:

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