Re: SP-GiST confusion: indexed column's type vs. index column type
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Pavel Borisov <pashkin.elfe@gmail.com>
Date: 2021-04-03T20:06:38Z
Lists: pgsql-hackers
Attachments
- 0001-fix-spgist-type-inconsistencies.patch (text/x-diff) patch 0001
- 0002-add-spgist-name-test.patch (text/x-diff) patch 0002
Here's a patch that, in addition to what I mentioned upthread, rescinds the limitation that user-defined SPGIST opclasses can't set the STORAGE parameter, and cleans up some residual confusion about whether values are of the indexed type (attType) or the storage type (leafType). Once I'd wrapped my head around the idea that indeed intermediate-level "reconstructed" values ought to be of the leafType, there were fewer bugs of that sort than I thought yesterday ... but still a nonzero number. I've also attached a test module that exercises reconstruction during index-only scan with leafType being meaningfully different from attType. I'm not quite sure whether this is worth committing, but I'm leaning towards doing so. regards, tom lane
Commits
-
Fix more confusion in SP-GiST.
- fd91fed3e802 13.3 landed
- dfc843d46568 14.0 landed
- 48b319e87636 12.7 landed
-
Fix confusion in SP-GiST between attribute type and leaf storage type.
- ac9099fc1dd4 14.0 landed
-
Rethink handling of pass-by-value leaf datums in SP-GiST.
- 1ebdec8c0329 14.0 cited