forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit86fba28
committed
Fix list partition constraints for partition keys of array type.
The old code generated always generated a constraint of the formcol = ANY(ARRAY[val1, val2, ...]), but that's invalid when col is anarray type. Instead, generate col = val when there's only one value,col = val1 OR col = val2 OR ... when there are multiple values andcol is of array type, and the old form when there are multiple valuesand col is not of an array type.As a side benefit, this makes constraint exclusion able to prunea list partition declared to accept a single Boolean value, whichdidn't work before.Amit Langote, reviewed by Etsuro FujitaDiscussion:http://postgr.es/m/97267195-e235-89d1-a41a-c110198dfce9@lab.ntt.co.jp1 parent167a22b commit86fba28
File tree
4 files changed
+90
-36
lines changed- src
- backend/catalog
- test/regress
- expected
- sql
4 files changed
+90
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1249 | 1249 | | |
1250 | 1250 | | |
1251 | 1251 | | |
1252 | | - | |
1253 | | - | |
1254 | | - | |
1255 | | - | |
1256 | | - | |
1257 | | - | |
1258 | | - | |
1259 | | - | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
1264 | 1306 | | |
1265 | 1307 | | |
1266 | 1308 | | |
| |||
1292 | 1334 | | |
1293 | 1335 | | |
1294 | 1336 | | |
1295 | | - | |
1296 | 1337 | | |
1297 | 1338 | | |
1298 | 1339 | | |
1299 | | - | |
| 1340 | + | |
1300 | 1341 | | |
1301 | 1342 | | |
1302 | 1343 | | |
| |||
1324 | 1365 | | |
1325 | 1366 | | |
1326 | 1367 | | |
1327 | | - | |
| 1368 | + | |
1328 | 1369 | | |
1329 | 1370 | | |
1330 | | - | |
| 1371 | + | |
1331 | 1372 | | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
1344 | 1377 | | |
1345 | | - | |
| 1378 | + | |
1346 | 1379 | | |
1347 | 1380 | | |
1348 | 1381 | | |
1349 | | - | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
1350 | 1386 | | |
1351 | 1387 | | |
1352 | 1388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
658 | | - | |
| 658 | + | |
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | | - | |
| 671 | + | |
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
685 | | - | |
| 685 | + | |
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
| |||
770 | 770 | | |
771 | 771 | | |
772 | 772 | | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1847 | 1847 | | |
1848 | 1848 | | |
1849 | 1849 | | |
1850 | | - | |
| 1850 | + | |
1851 | 1851 | | |
1852 | 1852 | | |
1853 | 1853 | | |
| |||
1918 | 1918 | | |
1919 | 1919 | | |
1920 | 1920 | | |
1921 | | - | |
| 1921 | + | |
1922 | 1922 | | |
1923 | 1923 | | |
1924 | 1924 | | |
| |||
1946 | 1946 | | |
1947 | 1947 | | |
1948 | 1948 | | |
1949 | | - | |
| 1949 | + | |
1950 | 1950 | | |
1951 | 1951 | | |
1952 | 1952 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
0 commit comments
Comments
(0)