mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-27 08:39:28 +08:00
OR processing cleanup.
This commit is contained in:
parent
f26e1d39be
commit
1c9a125096
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.22 1998/08/03 19:41:29 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.23 1998/08/04 18:42:38 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -269,33 +269,36 @@ ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent)
|
|||||||
{
|
{
|
||||||
qual = nth(i, indxqual);
|
qual = nth(i, indxqual);
|
||||||
n_keys = numScanKeys[i];
|
n_keys = numScanKeys[i];
|
||||||
run_keys = (int *) runtimeKeyInfo[i];
|
|
||||||
scan_keys = (ScanKey) scanKeys[i];
|
scan_keys = (ScanKey) scanKeys[i];
|
||||||
|
|
||||||
for (j = 0; j < n_keys; j++)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* If we have a run-time key, then extract the run-time
|
|
||||||
* expression and evaluate it with respect to the current
|
|
||||||
* outer tuple. We then stick the result into the scan key.
|
|
||||||
*/
|
|
||||||
if (run_keys[j] != NO_OP)
|
|
||||||
{
|
|
||||||
clause = nth(j, qual);
|
|
||||||
scanexpr = (run_keys[j] == RIGHT_OP) ?
|
|
||||||
(Node *) get_rightop(clause) : (Node *) get_leftop(clause);
|
|
||||||
|
|
||||||
|
if (runtimeKeyInfo)
|
||||||
|
{
|
||||||
|
run_keys = (int *) runtimeKeyInfo[i];
|
||||||
|
for (j = 0; j < n_keys; j++)
|
||||||
|
{
|
||||||
/*
|
/*
|
||||||
* pass in isDone but ignore it. We don't iterate in
|
* If we have a run-time key, then extract the run-time
|
||||||
* quals
|
* expression and evaluate it with respect to the current
|
||||||
|
* outer tuple. We then stick the result into the scan key.
|
||||||
*/
|
*/
|
||||||
scanvalue = (Datum)
|
if (run_keys[j] != NO_OP)
|
||||||
ExecEvalExpr(scanexpr, exprCtxt, &isNull, &isDone);
|
{
|
||||||
scan_keys[j].sk_argument = scanvalue;
|
clause = nth(j, qual);
|
||||||
if (isNull)
|
scanexpr = (run_keys[j] == RIGHT_OP) ?
|
||||||
scan_keys[j].sk_flags |= SK_ISNULL;
|
(Node *) get_rightop(clause) : (Node *) get_leftop(clause);
|
||||||
else
|
|
||||||
scan_keys[j].sk_flags &= ~SK_ISNULL;
|
/*
|
||||||
|
* pass in isDone but ignore it. We don't iterate in
|
||||||
|
* quals
|
||||||
|
*/
|
||||||
|
scanvalue = (Datum)
|
||||||
|
ExecEvalExpr(scanexpr, exprCtxt, &isNull, &isDone);
|
||||||
|
scan_keys[j].sk_argument = scanvalue;
|
||||||
|
if (isNull)
|
||||||
|
scan_keys[j].sk_flags |= SK_ISNULL;
|
||||||
|
else
|
||||||
|
scan_keys[j].sk_flags &= ~SK_ISNULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sdesc = scanDescs[i];
|
sdesc = scanDescs[i];
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user