Skip to content

Commit fb2c328

Browse files
committed
Repair logic error for multi-key indexes. From Oleg Bartunov.
1 parent 9a162a3 commit fb2c328

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/access/gist/gistscan.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/gist/gistscan.c,v 1.36 2001/06/09 18:16:55 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/gist/gistscan.c,v 1.37 2001/06/28 16:00:07 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -117,7 +117,7 @@ gistrescan(PG_FUNCTION_ARGS)
117117
s->keyData[i].sk_procedure
118118
= RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
119119
s->keyData[i].sk_procedure);
120-
s->keyData[i].sk_func = p->giststate->consistentFn[i];
120+
s->keyData[i].sk_func = p->giststate->consistentFn[s->keyData[i].sk_attno-1];
121121
}
122122
}
123123
else
@@ -148,7 +148,7 @@ gistrescan(PG_FUNCTION_ARGS)
148148
s->keyData[i].sk_procedure
149149
= RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
150150
s->keyData[i].sk_procedure);
151-
s->keyData[i].sk_func = p->giststate->consistentFn[i];
151+
s->keyData[i].sk_func = p->giststate->consistentFn[s->keyData[i].sk_attno-1];
152152
}
153153
}
154154

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