Re: Datum as struct
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter@eisentraut.org>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-08-08T20:55:01Z
Lists: 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
Commits
-
Use consistent type for pgaio_io_get_id() result
- b942360f82a0 18.0 landed
- 47932f3cdc4c 19 (unreleased) landed
-
Mop-up for Datum conversion cleanups.
- 665c3dbba497 19 (unreleased) landed
-
Add missing Datum conversions
- ff89e182d420 19 (unreleased) landed
-
Remove useless/superfluous Datum conversions
- dcfc0f891273 19 (unreleased) landed
-
Fix incorrect lack of Datum conversion in _int_matchsel()
- 387883f68c85 13.22 landed
- 64dec8060c84 14.19 landed
- f0d55b68ef92 15.14 landed
- a3906b44c5b9 16.10 landed
- 276cdd4cc378 17.6 landed
- 992a18f5161c 18.0 landed
- fd2ab03fea23 19 (unreleased) landed
-
Improve tests of date_trunc() with infinity and unsupported units
- 67ffe1987d0a 18.0 landed
- 572c0f1b0e2a 19 (unreleased) landed
-
Fix incorrect Datum conversion in timestamptz_trunc_internal()
- 074db8604ad1 18.0 landed
- 2242b26ce472 19 (unreleased) landed
-
Fix various hash function uses
- 2ad6e80de9a6 19 (unreleased) landed
-
Fix mixups of FooGetDatum() vs. DatumGetFoo()
- 1469e312977c 19 (unreleased) landed