diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2020-08-08 17:26:29 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2020-08-08 17:26:29 -0400 |
commit | 20e7e1fe316467720d8d062e1a1429f798fc31bf (patch) | |
tree | 631137904f5bf5d3ebfc07d7fe0ccbcb7c67269e /contrib/intarray/_int_gist.c | |
parent | 39132b784aeaaacf5ddfb5c35b6e29a6926f4345 (diff) | |
download | postgresql-20e7e1fe316467720d8d062e1a1429f798fc31bf.tar.gz postgresql-20e7e1fe316467720d8d062e1a1429f798fc31bf.zip |
Remove <@ from contrib/intarray's GiST operator classes.
Since commit efc77cf5f, an indexed query using <@ has required a
full-index scan, so that it actually performs worse than a plain seqscan
would do. As I noted at the time, we'd be better off to not treat <@ as
being indexable by such indexes at all; and that's what this patch does.
It would have been difficult to remove these opclass members without
dropping the whole opclass before commit 9f9682783 fixed GiST opclass
member dependency rules, but now it's quite simple, so let's do it.
I left the existing support code in place for the time being, with
comments noting it's now unreachable. At some point, perhaps we should
remove that code in favor of throwing an error telling people to upgrade
the extension version.
Discussion: https://postgr.es/m/2176979.1596389859@sss.pgh.pa.us
Discussion: https://postgr.es/m/458.1565114141@sss.pgh.pa.us
Diffstat (limited to 'contrib/intarray/_int_gist.c')
-rw-r--r-- | contrib/intarray/_int_gist.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c index fb05b06af9e..f1817a6cce3 100644 --- a/contrib/intarray/_int_gist.c +++ b/contrib/intarray/_int_gist.c @@ -93,6 +93,12 @@ g_int_consistent(PG_FUNCTION_ARGS) break; case RTContainedByStrategyNumber: case RTOldContainedByStrategyNumber: + + /* + * This code is unreachable as of intarray 1.4, because the <@ + * operator has been removed from the opclass. We keep it for now + * to support older versions of the SQL definitions. + */ if (GIST_LEAF(entry)) retval = inner_int_contains(query, (ArrayType *) DatumGetPointer(entry->key)); |