|
8 | 8 | * using ExecInitExpr() et al. This converts the tree into a flat array |
9 | 9 | * of ExprEvalSteps, which may be thought of as instructions in a program. |
10 | 10 | * At runtime, we'll execute steps, starting with the first, until we reach |
11 | | - * an EEOP_DONE opcode. |
| 11 | + * an EEOP_DONE_{RETURN|NO_RETURN} opcode. |
12 | 12 | * |
13 | 13 | * This file contains the "compilation" logic. It is independent of the |
14 | 14 | * specific execution technology we use (switch statement, computed goto, |
@@ -162,7 +162,7 @@ ExecInitExpr(Expr *node, PlanState *parent) |
162 | 162 | ExecInitExprRec(node, state, &state->resvalue, &state->resnull); |
163 | 163 |
|
164 | 164 | /* Finally, append a DONE step */ |
165 | | - scratch.opcode = EEOP_DONE; |
| 165 | + scratch.opcode = EEOP_DONE_RETURN; |
166 | 166 | ExprEvalPushStep(state, &scratch); |
167 | 167 |
|
168 | 168 | ExecReadyExpr(state); |
@@ -199,7 +199,7 @@ ExecInitExprWithParams(Expr *node, ParamListInfo ext_params) |
199 | 199 | ExecInitExprRec(node, state, &state->resvalue, &state->resnull); |
200 | 200 |
|
201 | 201 | /* Finally, append a DONE step */ |
202 | | - scratch.opcode = EEOP_DONE; |
| 202 | + scratch.opcode = EEOP_DONE_RETURN; |
203 | 203 | ExprEvalPushStep(state, &scratch); |
204 | 204 |
|
205 | 205 | ExecReadyExpr(state); |
@@ -291,7 +291,7 @@ ExecInitQual(List *qual, PlanState *parent) |
291 | 291 | * have yielded TRUE, and since its result is stored in the desired output |
292 | 292 | * location, we're done. |
293 | 293 | */ |
294 | | - scratch.opcode = EEOP_DONE; |
| 294 | + scratch.opcode = EEOP_DONE_RETURN; |
295 | 295 | ExprEvalPushStep(state, &scratch); |
296 | 296 |
|
297 | 297 | ExecReadyExpr(state); |
@@ -503,7 +503,7 @@ ExecBuildProjectionInfo(List *targetList, |
503 | 503 | } |
504 | 504 | } |
505 | 505 |
|
506 | | - scratch.opcode = EEOP_DONE; |
| 506 | + scratch.opcode = EEOP_DONE_NO_RETURN; |
507 | 507 | ExprEvalPushStep(state, &scratch); |
508 | 508 |
|
509 | 509 | ExecReadyExpr(state); |
@@ -742,7 +742,7 @@ ExecBuildUpdateProjection(List *targetList, |
742 | 742 | } |
743 | 743 | } |
744 | 744 |
|
745 | | - scratch.opcode = EEOP_DONE; |
| 745 | + scratch.opcode = EEOP_DONE_NO_RETURN; |
746 | 746 | ExprEvalPushStep(state, &scratch); |
747 | 747 |
|
748 | 748 | ExecReadyExpr(state); |
@@ -1714,7 +1714,7 @@ ExecInitExprRec(Expr *node, ExprState *state, |
1714 | 1714 | else |
1715 | 1715 | { |
1716 | 1716 | /* Not trivial, so append a DONE step */ |
1717 | | - scratch.opcode = EEOP_DONE; |
| 1717 | + scratch.opcode = EEOP_DONE_RETURN; |
1718 | 1718 | ExprEvalPushStep(elemstate, &scratch); |
1719 | 1719 | /* and ready the subexpression */ |
1720 | 1720 | ExecReadyExpr(elemstate); |
@@ -3991,7 +3991,7 @@ ExecBuildAggTrans(AggState *aggstate, AggStatePerPhase phase, |
3991 | 3991 |
|
3992 | 3992 | scratch.resvalue = NULL; |
3993 | 3993 | scratch.resnull = NULL; |
3994 | | - scratch.opcode = EEOP_DONE; |
| 3994 | + scratch.opcode = EEOP_DONE_NO_RETURN; |
3995 | 3995 | ExprEvalPushStep(state, &scratch); |
3996 | 3996 |
|
3997 | 3997 | ExecReadyExpr(state); |
@@ -4258,7 +4258,7 @@ ExecBuildHash32FromAttrs(TupleDesc desc, const TupleTableSlotOps *ops, |
4258 | 4258 |
|
4259 | 4259 | scratch.resvalue = NULL; |
4260 | 4260 | scratch.resnull = NULL; |
4261 | | - scratch.opcode = EEOP_DONE; |
| 4261 | + scratch.opcode = EEOP_DONE_RETURN; |
4262 | 4262 | ExprEvalPushStep(state, &scratch); |
4263 | 4263 |
|
4264 | 4264 | ExecReadyExpr(state); |
@@ -4431,7 +4431,7 @@ ExecBuildHash32Expr(TupleDesc desc, const TupleTableSlotOps *ops, |
4431 | 4431 |
|
4432 | 4432 | scratch.resvalue = NULL; |
4433 | 4433 | scratch.resnull = NULL; |
4434 | | - scratch.opcode = EEOP_DONE; |
| 4434 | + scratch.opcode = EEOP_DONE_RETURN; |
4435 | 4435 | ExprEvalPushStep(state, &scratch); |
4436 | 4436 |
|
4437 | 4437 | ExecReadyExpr(state); |
@@ -4586,7 +4586,7 @@ ExecBuildGroupingEqual(TupleDesc ldesc, TupleDesc rdesc, |
4586 | 4586 |
|
4587 | 4587 | scratch.resvalue = NULL; |
4588 | 4588 | scratch.resnull = NULL; |
4589 | | - scratch.opcode = EEOP_DONE; |
| 4589 | + scratch.opcode = EEOP_DONE_RETURN; |
4590 | 4590 | ExprEvalPushStep(state, &scratch); |
4591 | 4591 |
|
4592 | 4592 | ExecReadyExpr(state); |
@@ -4722,7 +4722,7 @@ ExecBuildParamSetEqual(TupleDesc desc, |
4722 | 4722 |
|
4723 | 4723 | scratch.resvalue = NULL; |
4724 | 4724 | scratch.resnull = NULL; |
4725 | | - scratch.opcode = EEOP_DONE; |
| 4725 | + scratch.opcode = EEOP_DONE_RETURN; |
4726 | 4726 | ExprEvalPushStep(state, &scratch); |
4727 | 4727 |
|
4728 | 4728 | ExecReadyExpr(state); |
|
0 commit comments