* fix_upper_expr * Modifies an expression tree so that all Var nodes reference outputs * of a subplan. Also looks for Aggref nodes that should be replaced * by initplan output Params. Also performs opcode lookup, and adds * regclass OIDs to root->glob->relationOids. * * This is used to fix up target and qual expressions of non-join upper-level * plan nodes, as well as index-only scan
| 3531 | * The original tree is not modified. |
| 3532 | */ |
| 3533 | static Node * |
| 3534 | fix_upper_expr(PlannerInfo *root, |
| 3535 | Node *node, |
| 3536 | indexed_tlist *subplan_itlist, |
| 3537 | Index newvarno, |
| 3538 | int rtoffset, |
| 3539 | double num_exec) |
| 3540 | { |
| 3541 | fix_upper_expr_context context; |
| 3542 | |
| 3543 | context.root = root; |
| 3544 | context.subplan_itlist = subplan_itlist; |
| 3545 | context.newvarno = newvarno; |
| 3546 | context.rtoffset = rtoffset; |
| 3547 | context.num_exec = num_exec; |
| 3548 | return fix_upper_expr_mutator(node, &context); |
| 3549 | } |
| 3550 | |
| 3551 | static Node * |
| 3552 | fix_upper_expr_mutator(Node *node, fix_upper_expr_context *context) |
no test coverage detected