- Notifications
You must be signed in to change notification settings - Fork5
Commitc1774d2
committed
More fixes for planner's handling of LATERAL.
Re-allow subquery pullup for LATERAL subqueries, except when the subqueryis below an outer join and contains lateral references to relations outsidethat outer join. If we pull up in such a case, we risk introducing lateralcross-references into outer joins' ON quals, which is something the code isentirely unprepared to cope with right now; and I'm not sure it'll ever beworth coping with.Support lateral refs in VALUES (this seems to be the only additional pathtype that needs such support as a consequence of re-allowing subquerypullup).Put in a slightly hacky fix for joinpath.c's refusal to considerparameterized join paths even when there cannot be any unparameterizedones. This was causing "could not devise a query plan for the given query"failures in queries involving more than two FROM items.Put in an even more hacky fix for distribute_qual_to_rels() being unhappywith join quals that contain references to rels outside their syntacticscope; which is to say, disable that test altogether. Need to think abouthow to preserve some sort of debugging cross-check here, while notexpending more cycles than befits a debugging cross-check.1 parente76af54 commitc1774d2
File tree
13 files changed
+390
-89
lines changed- src
- backend/optimizer
- path
- plan
- prep
- util
- include/optimizer
- test/regress
- expected
- sql
13 files changed
+390
-89
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1210 | 1210 | | |
1211 | 1211 | | |
1212 | 1212 | | |
1213 | | - | |
1214 | | - | |
1215 | | - | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
1216 | 1216 | | |
1217 | 1217 | | |
1218 | 1218 | | |
1219 | 1219 | | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
1220 | 1238 | | |
1221 | | - | |
| 1239 | + | |
1222 | 1240 | | |
1223 | 1241 | | |
1224 | 1242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1046 | 1046 | | |
1047 | 1047 | | |
1048 | 1048 | | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1049 | 1052 | | |
1050 | 1053 | | |
1051 | | - | |
| 1054 | + | |
| 1055 | + | |
1052 | 1056 | | |
1053 | 1057 | | |
1054 | 1058 | | |
| 1059 | + | |
1055 | 1060 | | |
1056 | 1061 | | |
1057 | 1062 | | |
1058 | 1063 | | |
1059 | 1064 | | |
1060 | 1065 | | |
1061 | | - | |
1062 | | - | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1063 | 1071 | | |
1064 | 1072 | | |
1065 | 1073 | | |
| |||
1068 | 1076 | | |
1069 | 1077 | | |
1070 | 1078 | | |
1071 | | - | |
1072 | | - | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
1073 | 1083 | | |
1074 | 1084 | | |
1075 | 1085 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
150 | 176 | | |
151 | 177 | | |
152 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1713 | 1713 | | |
1714 | 1714 | | |
1715 | 1715 | | |
| 1716 | + | |
1716 | 1717 | | |
1717 | 1718 | | |
1718 | 1719 | | |
1719 | 1720 | | |
1720 | 1721 | | |
| 1722 | + | |
1721 | 1723 | | |
1722 | 1724 | | |
1723 | 1725 | | |
1724 | 1726 | | |
1725 | 1727 | | |
1726 | 1728 | | |
1727 | 1729 | | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
1728 | 1740 | | |
1729 | | - | |
| 1741 | + | |
1730 | 1742 | | |
1731 | 1743 | | |
1732 | 1744 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
235 | 237 | | |
236 | 238 | | |
237 | 239 | | |
| |||
874 | 876 | | |
875 | 877 | | |
876 | 878 | | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
877 | 887 | | |
| 888 | + | |
878 | 889 | | |
879 | 890 | | |
| 891 | + | |
880 | 892 | | |
881 | 893 | | |
882 | 894 | | |
| |||
1031 | 1043 | | |
1032 | 1044 | | |
1033 | 1045 | | |
| 1046 | + | |
1034 | 1047 | | |
| 1048 | + | |
1035 | 1049 | | |
1036 | 1050 | | |
1037 | 1051 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| |||
0 commit comments
Comments
(0)