forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf492388
committed
Fix calculation of plan node extParams to account for the possibility that one
initPlan sets a parameter for another. This could not (I think) happen before8.1, but it's possible now because the initPlans generated by MIN/MAXoptimization might themselves use initPlans. We attach those initPlans assiblings of the MIN/MAX ones, not children, to avoid duplicate computationwhen multiple MIN/MAX aggregates are present; so this leads to the case of aninitPlan needing the result of a sibling initPlan, which is not possible withordinary query nesting. Hadn't been noticed because in most contexts havingtoo much stuff listed in extParam is fairly harmless. Fixes "plan should notreference subplan's variable" bug reported by Catalin Pitis.1 parente573459 commitf492388
1 file changed
+29
-10
lines changedLines changed: 29 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
912 | 912 |
| |
913 | 913 |
| |
914 | 914 |
| |
915 |
| - | |
916 |
| - | |
917 |
| - | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
918 | 920 |
| |
919 | 921 |
| |
920 | 922 |
| |
| |||
923 | 925 |
| |
924 | 926 |
| |
925 | 927 |
| |
| 928 | + | |
926 | 929 |
| |
927 | 930 |
| |
928 | 931 |
| |
| |||
954 | 957 |
| |
955 | 958 |
| |
956 | 959 |
| |
957 |
| - | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
958 | 965 |
| |
959 | 966 |
| |
960 | 967 |
| |
| |||
963 | 970 |
| |
964 | 971 |
| |
965 | 972 |
| |
| 973 | + | |
| 974 | + | |
966 | 975 |
| |
967 | 976 |
| |
968 | 977 |
| |
| 978 | + | |
969 | 979 |
| |
970 |
| - | |
971 |
| - | |
972 |
| - | |
973 |
| - | |
974 |
| - | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
975 | 986 |
| |
976 | 987 |
| |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
977 | 996 |
| |
978 | 997 |
| |
979 | 998 |
| |
|
0 commit comments
Comments
(0)