postgres.git / summary / log / commit / refs
commit d1bc3525c072a4c6bbc7bbba5da68cd30adfd1a6
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu Mar 25 15:50:22 2010 +0000
First released in: 9.0.0, 8.3.11, 8.4.4
Fix ginint4_queryextract() to actually do what it was intended to do for an
unsatisfiable query, such as indexcol && empty_array. It should return -1
to tell GIN no scan is required; but silly typo disabled the logic for that,
resulting in unnecessary "GIN indexes do not support whole-index scans" error.
Per bug report from Jeff Trout.
Back-patch to 8.3 where the logic was introduced.
contrib/intarray/_int_gin.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/intarray/_int_gin.c b/contrib/intarray/_int_gin.c
index 6856a68e038..37ea55b8d1f 100644
--- a/contrib/intarray/_int_gin.c
+++ b/contrib/intarray/_int_gin.c
@@ -57,7 +57,7 @@ ginint4_queryextract(PG_FUNCTION_ARGS)
}
}
- if (nentries == 0)
+ if (*nentries == 0)
{
switch (strategy)
{
[parent: e429448f3384]