mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Fix strategy propagation to scanEntry for partial match by moving propagation
to initializaion of scanEntry.
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/access/gin/ginget.c,v 1.18 2008/07/11 21:06:29 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/access/gin/ginget.c,v 1.19 2008/09/04 11:47:05 teodor Exp $
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -395,14 +395,7 @@ startScanKey(Relation index, GinState *ginstate, GinScanKey key)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < key->nentries; i++)
|
for (i = 0; i < key->nentries; i++)
|
||||||
{
|
|
||||||
startScanEntry(index, ginstate, key->scanEntry + i);
|
startScanEntry(index, ginstate, key->scanEntry + i);
|
||||||
/*
|
|
||||||
* Copy strategy number to each entry of key to
|
|
||||||
* use in comparePartialFn call
|
|
||||||
*/
|
|
||||||
key->scanEntry[i].strategy = key->strategy;
|
|
||||||
}
|
|
||||||
|
|
||||||
memset(key->entryRes, TRUE, sizeof(bool) * key->nentries);
|
memset(key->entryRes, TRUE, sizeof(bool) * key->nentries);
|
||||||
key->isFinished = FALSE;
|
key->isFinished = FALSE;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.17 2008/07/11 21:06:29 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.18 2008/09/04 11:47:05 teodor Exp $
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -61,6 +61,7 @@ fillScanKey(GinState *ginstate, GinScanKey key, OffsetNumber attnum, Datum query
|
|||||||
key->scanEntry[i].offset = InvalidOffsetNumber;
|
key->scanEntry[i].offset = InvalidOffsetNumber;
|
||||||
key->scanEntry[i].buffer = InvalidBuffer;
|
key->scanEntry[i].buffer = InvalidBuffer;
|
||||||
key->scanEntry[i].partialMatch = NULL;
|
key->scanEntry[i].partialMatch = NULL;
|
||||||
|
key->scanEntry[i].strategy = strategy;
|
||||||
key->scanEntry[i].list = NULL;
|
key->scanEntry[i].list = NULL;
|
||||||
key->scanEntry[i].nlist = 0;
|
key->scanEntry[i].nlist = 0;
|
||||||
key->scanEntry[i].isPartialMatch = ( ginstate->canPartialMatch[attnum - 1] && partial_matches )
|
key->scanEntry[i].isPartialMatch = ( ginstate->canPartialMatch[attnum - 1] && partial_matches )
|
||||||
|
Reference in New Issue
Block a user