* Add steps deforming the ExprState's inner/out/scan slots as much as * indicated by info. This is useful when building an ExprState covering more * than one expression. */
| 2668 | * than one expression. |
| 2669 | */ |
| 2670 | static void |
| 2671 | ExecPushExprSlots(ExprState *state, LastAttnumInfo *info) |
| 2672 | { |
| 2673 | ExprEvalStep scratch = {0}; |
| 2674 | |
| 2675 | scratch.resvalue = NULL; |
| 2676 | scratch.resnull = NULL; |
| 2677 | |
| 2678 | /* Emit steps as needed */ |
| 2679 | if (info->last_inner > 0) |
| 2680 | { |
| 2681 | scratch.opcode = EEOP_INNER_FETCHSOME; |
| 2682 | scratch.d.fetch.last_var = info->last_inner; |
| 2683 | scratch.d.fetch.fixed = false; |
| 2684 | scratch.d.fetch.kind = NULL; |
| 2685 | scratch.d.fetch.known_desc = NULL; |
| 2686 | if (ExecComputeSlotInfo(state, &scratch)) |
| 2687 | ExprEvalPushStep(state, &scratch); |
| 2688 | } |
| 2689 | if (info->last_outer > 0) |
| 2690 | { |
| 2691 | scratch.opcode = EEOP_OUTER_FETCHSOME; |
| 2692 | scratch.d.fetch.last_var = info->last_outer; |
| 2693 | scratch.d.fetch.fixed = false; |
| 2694 | scratch.d.fetch.kind = NULL; |
| 2695 | scratch.d.fetch.known_desc = NULL; |
| 2696 | if (ExecComputeSlotInfo(state, &scratch)) |
| 2697 | ExprEvalPushStep(state, &scratch); |
| 2698 | } |
| 2699 | if (info->last_scan > 0) |
| 2700 | { |
| 2701 | scratch.opcode = EEOP_SCAN_FETCHSOME; |
| 2702 | scratch.d.fetch.last_var = info->last_scan; |
| 2703 | scratch.d.fetch.fixed = false; |
| 2704 | scratch.d.fetch.kind = NULL; |
| 2705 | scratch.d.fetch.known_desc = NULL; |
| 2706 | if (ExecComputeSlotInfo(state, &scratch)) |
| 2707 | ExprEvalPushStep(state, &scratch); |
| 2708 | } |
| 2709 | } |
| 2710 | |
| 2711 | /* |
| 2712 | * get_last_attnums_walker: expression walker for ExecInitExprSlots |
no test coverage detected