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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy