From 09c1c6ab4bc5764dd69c53ccfd43b2060b1fd090 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 5 Apr 2021 18:41:09 -0400 Subject: Support INCLUDE'd columns in SP-GiST. Not much to say here: does what it says on the tin. We steal a previously-always-zero bit from the nextOffset field of leaf index tuples in order to track whether there is a nulls bitmap. Otherwise it works about like included columns in other index types. Pavel Borisov, reviewed by Andrey Borodin and Anastasia Lubennikova, and rather heavily editorialized on by me Discussion: https://postgr.es/m/CALT9ZEFi-vMp4faht9f9Junb1nO3NOSjhpxTmbm1UGLMsLqiEQ@mail.gmail.com --- src/backend/access/spgist/spginsert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/access/spgist/spginsert.c') diff --git a/src/backend/access/spgist/spginsert.c b/src/backend/access/spgist/spginsert.c index 0ca621450e6..1af0af7da21 100644 --- a/src/backend/access/spgist/spginsert.c +++ b/src/backend/access/spgist/spginsert.c @@ -56,7 +56,7 @@ spgistBuildCallback(Relation index, ItemPointer tid, Datum *values, * any temp data when retrying. */ while (!spgdoinsert(index, &buildstate->spgstate, tid, - *values, *isnull)) + values, isnull)) { MemoryContextReset(buildstate->tmpCtx); } @@ -227,7 +227,7 @@ spginsert(Relation index, Datum *values, bool *isnull, * to avoid cumulative memory consumption. That means we also have to * redo initSpGistState(), but it's cheap enough not to matter. */ - while (!spgdoinsert(index, &spgstate, ht_ctid, *values, *isnull)) + while (!spgdoinsert(index, &spgstate, ht_ctid, values, isnull)) { MemoryContextReset(insertCtx); initSpGistState(&spgstate, index); -- cgit v1.2.3