diff options
| author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-03-12 17:13:22 +0200 |
|---|---|---|
| committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2014-03-12 17:51:30 +0200 |
| commit | c5608ea26a1f51998ad3cf987c3f0bda643c87a8 (patch) | |
| tree | ea7370dc9696b18454f7102b3c26208455355d3c /src/include/tsearch | |
| parent | fecfc2b913c4be5eeed24b32ef51a3239580bd1e (diff) | |
| download | postgresql-c5608ea26a1f51998ad3cf987c3f0bda643c87a8.tar.gz | |
Allow opclasses to provide tri-valued GIN consistent functions.
With the GIN "fast scan" feature, GIN can skip items without fetching all
the keys for them, if it can prove that they don't match regardless of
those keys. So far, it has done the proving by calling the boolean
consistent function with all combinations of TRUE/FALSE for the unfetched
keys, but since that's O(n^2), it becomes unfeasible with more than a few
keys. We can avoid calling consistent with all the combinations, if we can
tell the operator class implementation directly which keys are unknown.
This commit includes a triConsistent function for the built-in array and
tsvector opclasses.
Alexander Korotkov, with some changes by me.
Diffstat (limited to 'src/include/tsearch')
| -rw-r--r-- | src/include/tsearch/ts_utils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/tsearch/ts_utils.h b/src/include/tsearch/ts_utils.h index 974e58cb52..2ffb3fb429 100644 --- a/src/include/tsearch/ts_utils.h +++ b/src/include/tsearch/ts_utils.h @@ -149,6 +149,7 @@ extern Datum gin_cmp_tslexeme(PG_FUNCTION_ARGS); extern Datum gin_cmp_prefix(PG_FUNCTION_ARGS); extern Datum gin_extract_tsquery(PG_FUNCTION_ARGS); extern Datum gin_tsquery_consistent(PG_FUNCTION_ARGS); +extern Datum gin_tsquery_triconsistent(PG_FUNCTION_ARGS); extern Datum gin_extract_tsvector_2args(PG_FUNCTION_ARGS); extern Datum gin_extract_tsquery_5args(PG_FUNCTION_ARGS); extern Datum gin_tsquery_consistent_6args(PG_FUNCTION_ARGS); |
