summaryrefslogtreecommitdiff
path: root/doc/src/sgml
diff options
context:
space:
mode:
authorTeodor Sigaev2007-01-31 15:09:45 +0000
committerTeodor Sigaev2007-01-31 15:09:45 +0000
commitd4c6da152782b580b24cd8b4054eb1b7fb72c5a0 (patch)
tree23db426588b5ff2a39981393a3cc4b48397b4294 /doc/src/sgml
parent147a3ce149088c913b152e7d37bb92f61bb068dd (diff)
Allow GIN's extractQuery method to signal that nothing can satisfy the query.
In this case extractQuery should returns -1 as nentries. This changes prototype of extractQuery method to use int32* instead of uint32* for nentries argument. Based on that gincostestimate may see two corner cases: nothing will be found or seqscan should be used. Per proposal at http://archives.postgresql.org/pgsql-hackers/2007-01/msg01581.php PS tsearch_core patch should be sightly modified to support changes, but I'm waiting a verdict about reviewing of tsearch_core patch.
Diffstat (limited to 'doc/src/sgml')
-rw-r--r--doc/src/sgml/gin.sgml12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/src/sgml/gin.sgml b/doc/src/sgml/gin.sgml
index c2bbad42bfa..32919e58711 100644
--- a/doc/src/sgml/gin.sgml
+++ b/doc/src/sgml/gin.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/gin.sgml,v 2.7 2006/12/01 23:46:46 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/gin.sgml,v 2.8 2007/01/31 15:09:45 teodor Exp $ -->
<chapter id="GIN">
<title>GIN Indexes</title>
@@ -77,7 +77,7 @@
</varlistentry>
<varlistentry>
- <term>Datum* extractValue(Datum inputValue, uint32 *nkeys)</term>
+ <term>Datum* extractValue(Datum inputValue, int32 *nkeys)</term>
<listitem>
<para>
Returns an array of keys given a value to be indexed. The
@@ -87,7 +87,7 @@
</varlistentry>
<varlistentry>
- <term>Datum* extractQuery(Datum query, uint32 *nkeys,
+ <term>Datum* extractQuery(Datum query, int32 *nkeys,
StrategyNumber n)</term>
<listitem>
<para>
@@ -100,6 +100,12 @@
to consult <literal>n</> to determine the data type of
<literal>query</> and the key values that need to be extracted.
The number of returned keys must be stored into <literal>*nkeys</>.
+ If number of keys is equal to zero then <function>extractQuery</>
+ should store 0 or -1 into <literal>*nkeys</>. 0 means that any
+ row matches the <literal>query</> and sequence scan should be
+ produced. -1 means nothing can satisfy <literal>query</>.
+ Choice of value should be based on semantics meaning of operation with
+ given strategy number.
</para>
</listitem>
</varlistentry>