diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2008-04-14 17:05:34 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2008-04-14 17:05:34 +0000 |
commit | 9b5c8d45f62bd3d243a40cc84deb93893f2f5122 (patch) | |
tree | 2d75607f7bdb96cfa1d73a3a36a4b3328118ff08 /contrib/hstore/hstore_gist.c | |
parent | 10be77c173211a75718f50fe6061862f6a0cb4a2 (diff) |
Push index operator lossiness determination down to GIST/GIN opclass
"consistent" functions, and remove pg_amop.opreqcheck, as per recent
discussion. The main immediate benefit of this is that we no longer need
8.3's ugly hack of requiring @@@ rather than @@ to test weight-using tsquery
searches on GIN indexes. In future it should be possible to optimize some
other queries better than is done now, by detecting at runtime whether the
index match is exact or not.
Tom Lane, after an idea of Heikki's, and with some help from Teodor.
Diffstat (limited to 'contrib/hstore/hstore_gist.c')
-rw-r--r-- | contrib/hstore/hstore_gist.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/hstore/hstore_gist.c b/contrib/hstore/hstore_gist.c index aa3aa0d94be..15ac9659919 100644 --- a/contrib/hstore/hstore_gist.c +++ b/contrib/hstore/hstore_gist.c @@ -508,9 +508,14 @@ ghstore_consistent(PG_FUNCTION_ARGS) { GISTTYPE *entry = (GISTTYPE *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(0))->key); StrategyNumber strategy = (StrategyNumber) PG_GETARG_UINT16(2); + /* Oid subtype = PG_GETARG_OID(3); */ + bool *recheck = (bool *) PG_GETARG_POINTER(4); bool res = true; BITVECP sign; + /* All cases served by this function are inexact */ + *recheck = true; + if (ISALLTRUE(entry)) PG_RETURN_BOOL(true); |