diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2007-01-31 15:09:45 +0000 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2007-01-31 15:09:45 +0000 |
commit | d4c6da152782b580b24cd8b4054eb1b7fb72c5a0 (patch) | |
tree | 23db426588b5ff2a39981393a3cc4b48397b4294 /src/backend/access/gin/gininsert.c | |
parent | 147a3ce149088c913b152e7d37bb92f61bb068dd (diff) | |
download | postgresql-d4c6da152782b580b24cd8b4054eb1b7fb72c5a0.tar.gz |
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 'src/backend/access/gin/gininsert.c')
-rw-r--r-- | src/backend/access/gin/gininsert.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/access/gin/gininsert.c b/src/backend/access/gin/gininsert.c index a7ded0c47f..3a17233ba8 100644 --- a/src/backend/access/gin/gininsert.c +++ b/src/backend/access/gin/gininsert.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/gin/gininsert.c,v 1.6 2007/01/05 22:19:21 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/gin/gininsert.c,v 1.7 2007/01/31 15:09:45 teodor Exp $ *------------------------------------------------------------------------- */ @@ -203,7 +203,7 @@ static uint32 ginHeapTupleBulkInsert(GinBuildState *buildstate, Datum value, ItemPointer heapptr) { Datum *entries; - uint32 nentries; + int32 nentries; MemoryContext oldCtx; oldCtx = MemoryContextSwitchTo(buildstate->funcCtx); @@ -356,7 +356,7 @@ static uint32 ginHeapTupleInsert(Relation index, GinState *ginstate, Datum value, ItemPointer item) { Datum *entries; - uint32 i, + int32 i, nentries; entries = extractEntriesSU(ginstate, value, &nentries); |