forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb1c891e
committed
Fix WITH attached to a nested set operation (UNION/INTERSECT/EXCEPT).
Parse analysis neglected to cover the case of a WITH clause attached to anintermediate-level set operation; it only handled WITH at the top levelor WITH attached to a leaf-level SELECT. Per report from Adam Mackler.In HEAD, I rearranged the order of SelectStmt's fields to put withClausewith the other fields that can appear on non-leaf SelectStmts. In backbranches, leave it alone to avoid a possible ABI break for third-partycode.Back-patch to 8.4 where WITH support was added.1 parent118b941 commitb1c891e
File tree
4 files changed
+116
-14
lines changed- src
- backend/parser
- test/regress
- expected
- sql
4 files changed
+116
-14
lines changedLines changed: 16 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1273 | 1273 |
| |
1274 | 1274 |
| |
1275 | 1275 |
| |
| 1276 | + | |
1276 | 1277 |
| |
1277 | 1278 |
| |
1278 | 1279 |
| |
| |||
1289 | 1290 |
| |
1290 | 1291 |
| |
1291 | 1292 |
| |
1292 |
| - | |
1293 |
| - | |
1294 |
| - | |
1295 |
| - | |
1296 |
| - | |
1297 |
| - | |
1298 |
| - | |
1299 |
| - | |
1300 | 1293 |
| |
1301 | 1294 |
| |
1302 | 1295 |
| |
| |||
1324 | 1317 |
| |
1325 | 1318 |
| |
1326 | 1319 |
| |
| 1320 | + | |
1327 | 1321 |
| |
1328 | 1322 |
| |
1329 | 1323 |
| |
1330 | 1324 |
| |
1331 | 1325 |
| |
| 1326 | + | |
1332 | 1327 |
| |
1333 | 1328 |
| |
1334 | 1329 |
| |
1335 | 1330 |
| |
1336 | 1331 |
| |
1337 | 1332 |
| |
1338 | 1333 |
| |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
1339 | 1342 |
| |
1340 | 1343 |
| |
1341 | 1344 |
| |
| |||
1534 | 1537 |
| |
1535 | 1538 |
| |
1536 | 1539 |
| |
1537 |
| - | |
1538 |
| - | |
1539 |
| - | |
1540 |
| - | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
1541 | 1544 |
| |
1542 | 1545 |
| |
1543 | 1546 |
| |
| |||
1548 | 1551 |
| |
1549 | 1552 |
| |
1550 | 1553 |
| |
1551 |
| - | |
| 1554 | + | |
1552 | 1555 |
| |
1553 | 1556 |
| |
1554 | 1557 |
| |
|
Lines changed: 14 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
685 | 685 |
| |
686 | 686 |
| |
687 | 687 |
| |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
688 | 700 |
| |
689 | 701 |
| |
690 | 702 |
| |
| |||
940 | 952 |
| |
941 | 953 |
| |
942 | 954 |
| |
943 |
| - | |
| 955 | + | |
944 | 956 |
| |
945 | 957 |
| |
946 | 958 |
| |
| |||
959 | 971 |
| |
960 | 972 |
| |
961 | 973 |
| |
| 974 | + | |
962 | 975 |
| |
963 | 976 |
| |
964 | 977 |
| |
|
Lines changed: 51 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1159 | 1159 |
| |
1160 | 1160 |
| |
1161 | 1161 |
| |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
1162 | 1213 |
| |
1163 | 1214 |
| |
1164 | 1215 |
| |
|
Lines changed: 35 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
539 | 539 |
| |
540 | 540 |
| |
541 | 541 |
| |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
542 | 577 |
| |
543 | 578 |
| |
544 | 579 |
| |
|
0 commit comments
Comments
(0)