forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite4baecf
committed
Fix SET CONSTRAINTS .. DEFERRED on partitioned tables
SET CONSTRAINTS ... DEFERRED failed on partitioned tables, because of asanity check that ensures that the affected constraints have triggers.On partitioned tables, the triggers are in the leaf partitions, not inthe partitioned relations themselves, so the sanity check fails.Removing the sanity check solves the problem, because the code needed tosupport the case is already there.Backpatch to 11.Note: deferred unique constraints are not affected by this bug, becausethey do have triggers in the parent partitioned table. I did not add atest for this scenario.Discussion:https://postgr.es/m/20191105212915.GA11324@alvherre.pgsql1 parentb49b7f9 commite4baecf
File tree
3 files changed
+38
-13
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+38
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5519 | 5519 | | |
5520 | 5520 | | |
5521 | 5521 | | |
5522 | | - | |
5523 | 5522 | | |
5524 | 5523 | | |
5525 | 5524 | | |
5526 | 5525 | | |
5527 | | - | |
5528 | | - | |
5529 | 5526 | | |
5530 | 5527 | | |
5531 | 5528 | | |
| |||
5547 | 5544 | | |
5548 | 5545 | | |
5549 | 5546 | | |
5550 | | - | |
5551 | | - | |
5552 | 5547 | | |
5553 | 5548 | | |
5554 | 5549 | | |
5555 | | - | |
5556 | | - | |
5557 | | - | |
5558 | | - | |
5559 | | - | |
5560 | 5550 | | |
5561 | 5551 | | |
5562 | 5552 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1926 | 1926 | | |
1927 | 1927 | | |
1928 | 1928 | | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
| 1938 | + | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
1929 | 1946 | | |
1930 | 1947 | | |
1931 | 1948 | | |
| |||
1938 | 1955 | | |
1939 | 1956 | | |
1940 | 1957 | | |
1941 | | - | |
1942 | | - | |
| 1958 | + | |
| 1959 | + | |
1943 | 1960 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1380 | 1380 | | |
1381 | 1381 | | |
1382 | 1382 | | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
1383 | 1401 | | |
1384 | 1402 | | |
1385 | 1403 | | |
| |||
1392 | 1410 | | |
1393 | 1411 | | |
1394 | 1412 | | |
1395 | | - | |
| 1413 | + | |
1396 | 1414 | | |
0 commit comments
Comments
(0)