mirror of
https://github.com/postgres/postgres.git
synced 2025-10-22 14:32:25 +03:00
1. Pass GISTENTRYs to giststate->penaltyFn by pointers, not by vals.
2. Re-initialize keys in gistrescan (if gist used in inner scan).
This commit is contained in:
@@ -118,6 +118,13 @@ gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
|
||||
gistfreestack(p->s_markstk);
|
||||
p->s_stack = p->s_markstk = (GISTSTACK *) NULL;
|
||||
p->s_flags = 0x0;
|
||||
for (i = 0; i < s->numberOfKeys; i++)
|
||||
{
|
||||
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;
|
||||
}
|
||||
} else {
|
||||
/* initialize opaque data */
|
||||
p = (GISTScanOpaque) palloc(sizeof(GISTScanOpaqueData));
|
||||
|
Reference in New Issue
Block a user