Repair logic error for multi-key indexes. From Oleg Bartunov.

This commit is contained in:
Tom Lane 2001-06-28 16:00:07 +00:00
parent 9a162a39d9
commit fb2c3289ff
1 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/gist/gistscan.c,v 1.36 2001/06/09 18:16:55 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/gist/gistscan.c,v 1.37 2001/06/28 16:00:07 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -117,7 +117,7 @@ gistrescan(PG_FUNCTION_ARGS)
s->keyData[i].sk_procedure
= RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
s->keyData[i].sk_procedure);
s->keyData[i].sk_func = p->giststate->consistentFn[i];
s->keyData[i].sk_func = p->giststate->consistentFn[s->keyData[i].sk_attno-1];
}
}
else
@ -148,7 +148,7 @@ gistrescan(PG_FUNCTION_ARGS)
s->keyData[i].sk_procedure
= RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
s->keyData[i].sk_procedure);
s->keyData[i].sk_func = p->giststate->consistentFn[i];
s->keyData[i].sk_func = p->giststate->consistentFn[s->keyData[i].sk_attno-1];
}
}