aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/spgist/spginsert.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-04-05 18:41:09 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-04-05 18:41:21 -0400
commit09c1c6ab4bc5764dd69c53ccfd43b2060b1fd090 (patch)
tree0b5eacefe5007d52388f475499b018cccd228c0e /src/backend/access/spgist/spginsert.c
parent49f49defe7c0a330cca084de5da14ccdfdafc6a3 (diff)
downloadpostgresql-09c1c6ab4bc5764dd69c53ccfd43b2060b1fd090.tar.gz
postgresql-09c1c6ab4bc5764dd69c53ccfd43b2060b1fd090.zip
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
Diffstat (limited to 'src/backend/access/spgist/spginsert.c')
-rw-r--r--src/backend/access/spgist/spginsert.c4
1 files changed, 2 insertions, 2 deletions
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);