* finalize_agg_primnode: find all Aggref nodes in the given expression tree, * and add IDs of all PARAM_EXEC params appearing within their aggregated * arguments to the result set. */
| 3473 | * arguments to the result set. |
| 3474 | */ |
| 3475 | static bool |
| 3476 | finalize_agg_primnode(Node *node, finalize_primnode_context *context) |
| 3477 | { |
| 3478 | if (node == NULL) |
| 3479 | return false; |
| 3480 | if (IsA(node, Aggref)) |
| 3481 | { |
| 3482 | Aggref *agg = (Aggref *) node; |
| 3483 | |
| 3484 | /* we should not consider the direct arguments, if any */ |
| 3485 | finalize_primnode((Node *) agg->args, context); |
| 3486 | finalize_primnode((Node *) agg->aggfilter, context); |
| 3487 | return false; /* there can't be any Aggrefs below here */ |
| 3488 | } |
| 3489 | return expression_tree_walker(node, finalize_agg_primnode, |
| 3490 | (void *) context); |
| 3491 | } |
| 3492 | |
| 3493 | /* |
| 3494 | * SS_make_initplan_output_param - make a Param for an initPlan's output |
no test coverage detected