Allow GIN's extractQuery method to signal that nothing can satisfy the query.
authorTeodor Sigaev <teodor@sigaev.ru>
Wed, 31 Jan 2007 15:09:45 +0000 (15:09 +0000)
committerTeodor Sigaev <teodor@sigaev.ru>
Wed, 31 Jan 2007 15:09:45 +0000 (15:09 +0000)
commit189c7a15764630160b577a1a1f84f8f42010a58d
treeb2fc41dce5f21c0ff3789f4543b19d21b45406c6
parentfb599bedd8b488befb1f006b15fb43fda325de9f
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.
contrib/intarray/_int_gin.c
contrib/tsearch2/ginidx.c
doc/src/sgml/gin.sgml
src/backend/access/gin/ginarrayproc.c
src/backend/access/gin/ginbulk.c
src/backend/access/gin/ginget.c
src/backend/access/gin/gininsert.c
src/backend/access/gin/ginscan.c
src/backend/access/gin/ginutil.c
src/backend/utils/adt/selfuncs.c
src/include/access/gin.h