forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc94fb8e
committed
Standardize some more loops that chase down parallel lists.
We have forboth() and forthree() macros that simplify iteratingthrough several parallel lists, but not everyplace that couldreasonably use those was doing so. Also invent forfour() andforfive() macros to do the same for four or five parallel lists,and use those where applicable.The immediate motivation for doing this is to reduce the numberof ad-hoc lnext() calls, to reduce the footprint of a WIP patch.However, it seems like good cleanup and error-proofing anyway;the places that were combining forthree() with a manually iteratedloop seem particularly illegible and bug-prone.There was some speculation about restructuring related parsetreerepresentations to reduce the need for parallel list chasing ofthis sort. Perhaps that's a win, or perhaps not, but in any caseit would be considerably more invasive than this patch; and it'snot particularly related to my immediate goal of improving theList infrastructure. So I'll leave that question for another day.Patch by me; thanks to David Rowley for review.Discussion:https://postgr.es/m/11587.1550975080@sss.pgh.pa.us1 parent0a271df commitc94fb8e
File tree
9 files changed
+76
-115
lines changed- src
- backend
- access/common
- executor
- optimizer
- plan
- prep
- parser
- utils/adt
- include/nodes
9 files changed
+76
-115
lines changedLines changed: 4 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
902 | 902 |
| |
903 | 903 |
| |
904 | 904 |
| |
905 |
| - | |
906 |
| - | |
907 |
| - | |
908 |
| - | |
909 |
| - | |
| 905 | + | |
910 | 906 |
| |
911 | 907 |
| |
912 |
| - | |
913 |
| - | |
914 |
| - | |
915 |
| - | |
916 |
| - | |
917 |
| - | |
918 |
| - | |
919 |
| - | |
920 |
| - | |
921 |
| - | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
922 | 911 |
| |
923 | 912 |
| |
924 | 913 |
| |
|
Lines changed: 5 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1683 | 1683 |
| |
1684 | 1684 |
| |
1685 | 1685 |
| |
1686 |
| - | |
1687 | 1686 |
| |
1688 | 1687 |
| |
1689 | 1688 |
| |
| |||
1695 | 1694 |
| |
1696 | 1695 |
| |
1697 | 1696 |
| |
1698 |
| - | |
1699 |
| - | |
1700 |
| - | |
1701 |
| - | |
1702 |
| - | |
1703 |
| - | |
1704 |
| - | |
1705 |
| - | |
1706 |
| - | |
1707 |
| - | |
1708 |
| - | |
1709 |
| - | |
1710 |
| - | |
1711 |
| - | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
1712 | 1702 |
| |
1713 | 1703 |
| |
1714 | 1704 |
| |
|
Lines changed: 11 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1332 | 1332 |
| |
1333 | 1333 |
| |
1334 | 1334 |
| |
1335 |
| - | |
1336 |
| - | |
1337 |
| - | |
1338 |
| - | |
1339 | 1335 |
| |
1340 | 1336 |
| |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
1341 | 1341 |
| |
1342 | 1342 |
| |
1343 | 1343 |
| |
| |||
1346 | 1346 |
| |
1347 | 1347 |
| |
1348 | 1348 |
| |
1349 |
| - | |
| 1349 | + | |
| 1350 | + | |
1350 | 1351 |
| |
1351 | 1352 |
| |
1352 | 1353 |
| |
1353 | 1354 |
| |
1354 | 1355 |
| |
1355 | 1356 |
| |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
1356 | 1362 |
| |
1357 | 1363 |
| |
1358 | 1364 |
| |
1359 |
| - | |
1360 |
| - | |
1361 |
| - | |
1362 | 1365 |
| |
1363 | 1366 |
| |
1364 | 1367 |
| |
| |||
1374 | 1377 |
| |
1375 | 1378 |
| |
1376 | 1379 |
| |
1377 |
| - | |
1378 |
| - | |
1379 |
| - | |
1380 | 1380 |
| |
1381 | 1381 |
| |
1382 | 1382 |
| |
| |||
1398 | 1398 |
| |
1399 | 1399 |
| |
1400 | 1400 |
| |
1401 |
| - | |
1402 |
| - | |
1403 |
| - | |
1404 | 1401 |
| |
1405 | 1402 |
| |
1406 | 1403 |
| |
1407 |
| - | |
1408 |
| - | |
1409 |
| - | |
1410 | 1404 |
| |
1411 | 1405 |
| |
1412 | 1406 |
| |
|
Lines changed: 1 addition & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1680 | 1680 |
| |
1681 | 1681 |
| |
1682 | 1682 |
| |
1683 |
| - | |
1684 |
| - | |
1685 |
| - | |
| 1683 | + | |
1686 | 1684 |
| |
1687 | 1685 |
| |
1688 | 1686 |
| |
1689 | 1687 |
| |
1690 | 1688 |
| |
1691 | 1689 |
| |
1692 | 1690 |
| |
1693 |
| - | |
1694 | 1691 |
| |
1695 | 1692 |
| |
1696 | 1693 |
| |
|
Lines changed: 2 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1130 | 1130 |
| |
1131 | 1131 |
| |
1132 | 1132 |
| |
1133 |
| - | |
1134 |
| - | |
1135 |
| - | |
| 1133 | + | |
| 1134 | + | |
1136 | 1135 |
| |
1137 | 1136 |
| |
1138 | 1137 |
| |
1139 | 1138 |
| |
1140 | 1139 |
| |
1141 | 1140 |
| |
1142 |
| - | |
1143 |
| - | |
1144 | 1141 |
| |
1145 | 1142 |
| |
1146 | 1143 |
| |
|
Lines changed: 13 additions & 29 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
831 | 831 |
| |
832 | 832 |
| |
833 | 833 |
| |
834 |
| - | |
835 |
| - | |
836 |
| - | |
| 834 | + | |
| 835 | + | |
837 | 836 |
| |
838 | 837 |
| |
839 |
| - | |
840 |
| - | |
| 838 | + | |
| 839 | + | |
841 | 840 |
| |
842 | 841 |
| |
843 |
| - | |
844 |
| - | |
845 |
| - | |
846 | 842 |
| |
847 | 843 |
| |
848 | 844 |
| |
| |||
851 | 847 |
| |
852 | 848 |
| |
853 | 849 |
| |
854 |
| - | |
855 |
| - | |
856 |
| - | |
857 | 850 |
| |
858 | 851 |
| |
859 | 852 |
| |
| |||
950 | 943 |
| |
951 | 944 |
| |
952 | 945 |
| |
953 |
| - | |
954 |
| - | |
955 |
| - | |
| 946 | + | |
956 | 947 |
| |
957 | 948 |
| |
958 |
| - | |
959 |
| - | |
960 |
| - | |
| 949 | + | |
| 950 | + | |
961 | 951 |
| |
962 | 952 |
| |
963 | 953 |
| |
964 | 954 |
| |
965 |
| - | |
| 955 | + | |
966 | 956 |
| |
967 | 957 |
| |
968 | 958 |
| |
| |||
991 | 981 |
| |
992 | 982 |
| |
993 | 983 |
| |
994 |
| - | |
995 |
| - | |
996 |
| - | |
997 | 984 |
| |
998 | 985 |
| |
999 | 986 |
| |
| |||
1699 | 1686 |
| |
1700 | 1687 |
| |
1701 | 1688 |
| |
1702 |
| - | |
1703 | 1689 |
| |
1704 |
| - | |
1705 |
| - | |
1706 |
| - | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
1707 | 1694 |
| |
1708 | 1695 |
| |
1709 | 1696 |
| |
| |||
1729 | 1716 |
| |
1730 | 1717 |
| |
1731 | 1718 |
| |
1732 |
| - | |
1733 | 1719 |
| |
1734 | 1720 |
| |
1735 | 1721 |
| |
| |||
2201 | 2187 |
| |
2202 | 2188 |
| |
2203 | 2189 |
| |
2204 |
| - | |
2205 | 2190 |
| |
2206 | 2191 |
| |
2207 |
| - | |
| 2192 | + | |
2208 | 2193 |
| |
2209 | 2194 |
| |
2210 | 2195 |
| |
| |||
2218 | 2203 |
| |
2219 | 2204 |
| |
2220 | 2205 |
| |
2221 |
| - | |
2222 | 2206 |
| |
2223 | 2207 |
| |
2224 | 2208 |
| |
|
Lines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2124 | 2124 |
| |
2125 | 2125 |
| |
2126 | 2126 |
| |
2127 |
| - | |
2128 |
| - | |
| 2127 | + | |
| 2128 | + | |
2129 | 2129 |
| |
2130 | 2130 |
| |
2131 | 2131 |
| |
2132 |
| - | |
2133 |
| - | |
| 2132 | + | |
2134 | 2133 |
| |
2135 | 2134 |
| |
2136 | 2135 |
| |
|
Lines changed: 11 additions & 26 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9811 | 9811 |
| |
9812 | 9812 |
| |
9813 | 9813 |
| |
9814 |
| - | |
9815 |
| - | |
9816 |
| - | |
9817 |
| - | |
9818 |
| - | |
9819 | 9814 |
| |
9820 |
| - | |
| 9815 | + | |
| 9816 | + | |
9821 | 9817 |
| |
9822 | 9818 |
| |
9823 |
| - | |
9824 |
| - | |
9825 |
| - | |
9826 |
| - | |
9827 |
| - | |
| 9819 | + | |
| 9820 | + | |
| 9821 | + | |
| 9822 | + | |
| 9823 | + | |
9828 | 9824 |
| |
9829 | 9825 |
| |
9830 |
| - | |
9831 |
| - | |
9832 |
| - | |
9833 |
| - | |
9834 |
| - | |
9835 |
| - | |
9836 |
| - | |
9837 |
| - | |
9838 |
| - | |
9839 | 9826 |
| |
9840 | 9827 |
| |
9841 | 9828 |
| |
| |||
10349 | 10336 |
| |
10350 | 10337 |
| |
10351 | 10338 |
| |
10352 |
| - | |
10353 | 10339 |
| |
10354 |
| - | |
10355 |
| - | |
10356 |
| - | |
10357 |
| - | |
| 10340 | + | |
| 10341 | + | |
| 10342 | + | |
| 10343 | + | |
10358 | 10344 |
| |
10359 | 10345 |
| |
10360 | 10346 |
| |
| |||
10378 | 10364 |
| |
10379 | 10365 |
| |
10380 | 10366 |
| |
10381 |
| - | |
10382 | 10367 |
| |
10383 | 10368 |
| |
10384 | 10369 |
| |
|
Lines changed: 26 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
208 | 234 |
| |
209 | 235 |
| |
210 | 236 |
| |
|
0 commit comments
Comments
(0)