Re: Allow GiST opcalsses without compress\decompres functions
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: amborodin@acm.org, Andrew Borodin <borodin@octonica.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2017-05-28T17:22:27Z
Lists: pgsql-hackers
Andrew Borodin <borodin@octonica.com> writes: > Maybe we should make compress\decompress functions optional? 1. You'll need to adjust the documentation (gist.sgml) not just the code. 2. If compress/decompress are omitted, then we could support index-only scans all the time, that is a no-op fetch function would work. The patch should cover that interaction too. 3. Personally I wouldn't bother with the separate compressed[] flags, just look at OidIsValid(giststate->compressFn[i].fn_oid). 4. I don't think you thought very carefully about the combinations where only one of the two functions is supplied. I can definitely see that compress + no decompress could be sensible. Less sure about the other case, but why not allow it? We could just say that an omitted function is taken to represent a no-op transformation. Please add this to the next commitfest. regards, tom lane
Commits
-
Allow no-op GiST support functions to be omitted.
- d3a4f89d8a3e 11.0 landed
-
Remove no-op GiST support functions in the core GiST opclasses.
- 2d484f9b0580 11.0 landed