summaryrefslogtreecommitdiff
path: root/src/backend/access/gin/ginscan.c
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2009-04-05 11:32:01 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2009-04-05 11:32:01 +0000
commit329a5322e9280bde04907f947ada2e2627ef41c2 (patch)
treeffffa358c3f195575e81b84010f882639548b039 /src/backend/access/gin/ginscan.c
parent27fbfd396c62178f58564e77e5f27ed541618b3e (diff)
Fix infinite loop while checking of partial match in pending list.
Improve comments. Now GIN-indexable operators should be strict. Per Tom's questions/suggestions.
Diffstat (limited to 'src/backend/access/gin/ginscan.c')
-rw-r--r--src/backend/access/gin/ginscan.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/backend/access/gin/ginscan.c b/src/backend/access/gin/ginscan.c
index 486adb6d7e8..a3d11357084 100644
--- a/src/backend/access/gin/ginscan.c
+++ b/src/backend/access/gin/ginscan.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.22 2009/03/25 22:19:01 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.23 2009/04/05 11:32:01 teodor Exp $
*-------------------------------------------------------------------------
*/
@@ -175,12 +175,15 @@ newScanKey(IndexScanDesc scan)
bool *partial_matches = NULL;
Pointer *extra_data = NULL;
- /* XXX can't we treat nulls by just setting isVoidRes? */
- /* This would amount to assuming that all GIN operators are strict */
+ /*
+ * Assume, that GIN-indexable operators are strict, so
+ * nothing could be found
+ */
if (skey->sk_flags & SK_ISNULL)
- ereport(ERROR,
- (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("GIN indexes do not support NULL scan keys")));
+ {
+ so->isVoidRes = true;
+ break;
+ }
entryValues = (Datum *)
DatumGetPointer(FunctionCall5(&so->ginstate.extractQueryFn[skey->sk_attno - 1],