Content-Length: 269879 | pFad | http://github.com/postgrespro/postgres/commit/5ceb13c8a12320a44fa211cf0ba32b1641270aeb

BC Fix ginint4_queryextract() to actually do what it was intended to do … · postgrespro/postgres@5ceb13c · GitHub
Skip to content

Commit 5ceb13c

Browse files
committed
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.
1 parent be8cebc commit 5ceb13c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/intarray/_int_gin.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* $PostgreSQL: pgsql/contrib/intarray/_int_gin.c,v 1.10 2009/06/11 14:48:51 momjian Exp $
2+
* $PostgreSQL: pgsql/contrib/intarray/_int_gin.c,v 1.11 2010/03/25 15:50:10 tgl Exp $
33
*/
44
#include "postgres.h"
55

@@ -65,7 +65,7 @@ ginint4_queryextract(PG_FUNCTION_ARGS)
6565
}
6666
}
6767

68-
if (nentries == 0)
68+
if (*nentries == 0)
6969
{
7070
switch (strategy)
7171
{

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/5ceb13c8a12320a44fa211cf0ba32b1641270aeb

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy