mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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.
This commit is contained in:
@ -42,7 +42,11 @@ float32 seg_center(SEG * seg);
|
||||
/*
|
||||
** GiST support methods
|
||||
*/
|
||||
bool gseg_consistent(GISTENTRY *entry, SEG * query, StrategyNumber strategy);
|
||||
bool gseg_consistent(GISTENTRY *entry,
|
||||
SEG * query,
|
||||
StrategyNumber strategy,
|
||||
Oid subtype,
|
||||
bool *recheck);
|
||||
GISTENTRY *gseg_compress(GISTENTRY *entry);
|
||||
GISTENTRY *gseg_decompress(GISTENTRY *entry);
|
||||
float *gseg_penalty(GISTENTRY *origentry, GISTENTRY *newentry, float *result);
|
||||
@ -202,8 +206,13 @@ seg_upper(SEG * seg)
|
||||
bool
|
||||
gseg_consistent(GISTENTRY *entry,
|
||||
SEG * query,
|
||||
StrategyNumber strategy)
|
||||
StrategyNumber strategy,
|
||||
Oid subtype,
|
||||
bool *recheck)
|
||||
{
|
||||
/* All cases served by this function are exact */
|
||||
*recheck = false;
|
||||
|
||||
/*
|
||||
* if entry is not leaf, use gseg_internal_consistent, else use
|
||||
* gseg_leaf_consistent
|
||||
|
Reference in New Issue
Block a user