* UpdateChangedParamSet * Add changed parameters to a plan node's chgParam set */
| 919 | * Add changed parameters to a plan node's chgParam set |
| 920 | */ |
| 921 | void |
| 922 | UpdateChangedParamSet(PlanState *node, Bitmapset *newchg) |
| 923 | { |
| 924 | Bitmapset *parmset; |
| 925 | |
| 926 | /* |
| 927 | * The plan node only depends on params listed in its allParam set. Don't |
| 928 | * include anything else into its chgParam set. |
| 929 | */ |
| 930 | parmset = bms_intersect(node->plan->allParam, newchg); |
| 931 | |
| 932 | /* |
| 933 | * Keep node->chgParam == NULL if there's not actually any members; this |
| 934 | * allows the simplest possible tests in executor node files. |
| 935 | */ |
| 936 | if (!bms_is_empty(parmset)) |
| 937 | node->chgParam = bms_join(node->chgParam, parmset); |
| 938 | else |
| 939 | bms_free(parmset); |
| 940 | } |
| 941 | |
| 942 | /* |
| 943 | * executor_errposition |
no test coverage detected