diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-08-04 18:42:39 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-08-04 18:42:39 +0000 |
commit | 1c9a1250964528274dd785da83cfc16f29cd1bec (patch) | |
tree | a919c5011df0e65161ad1b4e42d4f0c1f7dd707c /src/backend/executor/nodeIndexscan.c | |
parent | f26e1d39be136f6326f1173e80f5e0af14546e85 (diff) | |
download | postgresql-1c9a1250964528274dd785da83cfc16f29cd1bec.tar.gz postgresql-1c9a1250964528274dd785da83cfc16f29cd1bec.zip |
OR processing cleanup.
Diffstat (limited to 'src/backend/executor/nodeIndexscan.c')
-rw-r--r-- | src/backend/executor/nodeIndexscan.c | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index 074943174f5..55cc9d926fa 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -7,7 +7,7 @@ * * * 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); n_keys = numScanKeys[i]; - run_keys = (int *) runtimeKeyInfo[i]; scan_keys = (ScanKey) scanKeys[i]; - - for (j = 0; j < n_keys; j++) + + if (runtimeKeyInfo) { - /* - * 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) + run_keys = (int *) runtimeKeyInfo[i]; + for (j = 0; j < n_keys; j++) { - clause = nth(j, qual); - scanexpr = (run_keys[j] == RIGHT_OP) ? - (Node *) get_rightop(clause) : (Node *) get_leftop(clause); - /* - * pass in isDone but ignore it. We don't iterate in - * quals + * 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. */ - 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; + if (run_keys[j] != NO_OP) + { + clause = nth(j, qual); + scanexpr = (run_keys[j] == RIGHT_OP) ? + (Node *) get_rightop(clause) : (Node *) get_leftop(clause); + + /* + * 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]; |