Re: [PATCH] Covering SPGiST index
x4mmm@yandex-team.ru
From: "Andrey M. Borodin" <x4mmm@yandex-team.ru>
To: Pavel Borisov <pashkin.elfe@gmail.com>
Cc: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>,
Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-08-30T13:01:19Z
Lists: pgsql-hackers
> 27 авг. 2020 г., в 21:03, Pavel Borisov <pashkin.elfe@gmail.com> написал(а): > > see v8 For me is the only concerning point is putting nullmask and varatt bits into tuple->nextOffset. But, probably, we can go with this. But let's change macro a bit. When I see SGLT_SET_OFFSET(leafTuple->nextOffset, InvalidOffsetNumber); I expect that leafTuple->nextOffset is function argument by value and will not be changed. For example see ItemPointerSetOffsetNumber() - it's not exposing ip_posid. Also, I'd propose instead of >*(leafChainDatums + i * natts) and leafChainIsnulls + i * natts using something like >int some_index = i * natts; >leafChainDatumsp[some_index] and &leafChainIsnulls[some_index] But, probably, it's a matter of taste... Also I'm not sure would it be helpful to use instead of >isnull[0] and leafDatum[0] more complex >#define SpgKeyIndex 0 >isnull[SpgKeyIndex] and leafDatum[SpgKeyIndex] There is so many [0] in the patch... Thanks! Best regards, Andrey Borodin.
Commits
-
Support INCLUDE'd columns in SP-GiST.
- 09c1c6ab4bc5 14.0 landed
-
Rethink handling of pass-by-value leaf datums in SP-GiST.
- 1ebdec8c0329 14.0 landed