On 12 March 2014 15:52, Heikki Linnakangas <[email protected]> wrote:
> 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.
Patch to fix a couple typos attached.
--
Thom
diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml
index 0bd7592..80fb4f3 100644
--- a/doc/src/sgml/gin.sgml
+++ b/doc/src/sgml/gin.sgml
@@ -197,7 +197,7 @@
function, and a ternary <function>triConsistent</> function.
<function>triConsistent</> covers the functionality of both, so providing
triConsistent alone is sufficient. However, if the boolean variant is
- significantly cheaper to calculate, it can be advantegous to provide both.
+ significantly cheaper to calculate, it can be advantageous to provide both.
If only the boolean variant is provided, some optimizations that depend on
refuting index items before fetching all the keys are disabled.
@@ -219,7 +219,7 @@
returned by <function>extractQuery</> for this <literal>query</> datum.
Each element of the
<literal>check</> array is TRUE if the indexed item contains the
- corresponding query key, ie, if (check[i] == TRUE) the i-th key of the
+ corresponding query key, i.e., if (check[i] == TRUE) the i-th key of the
<function>extractQuery</> result array is present in the indexed item.
The original <literal>query</> datum is
passed in case the <function>consistent</> method needs to consult it,
--
Sent via pgsql-committers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers