- Notifications
You must be signed in to change notification settings - Fork5
Commitcd902b3
committed
Change the rules for inherited CHECK constraints to be essentially the same
as those for inherited columns; that is, it's no longer allowed for a childtable to not have a check constraint matching one that exists on a parent.This satisfies the principle of least surprise (rows selected from the parentwill always appear to meet its check constraints) and eliminates somelongstanding bogosity in pg_dump, which formerly had to guess about whethercheck constraints were really inherited or not.The implementation involves adding conislocal and coninhcount columns topg_constraint (paralleling attislocal and attinhcount in pg_attribute)and refactoring various ALTER TABLE actions to be more like those forcolumns.Alex Hunsaker, Nikhil Sontakke, Tom Lane1 parentf8df836 commitcd902b3
File tree
25 files changed
+1385
-569
lines changed- doc/src/sgml
- ref
- src
- backend
- access/common
- bootstrap
- catalog
- commands
- executor
- bin/pg_dump
- include
- catalog
- nodes
- test/regress
- expected
- sql
25 files changed
+1385
-569
lines changedLines changed: 21 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
1907 | 1907 |
| |
1908 | 1908 |
| |
1909 | 1909 |
| |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
1910 | 1930 |
| |
1911 | 1931 |
| |
1912 | 1932 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
2107 | 2107 |
| |
2108 | 2108 |
| |
2109 | 2109 |
| |
2110 |
| - | |
| 2110 | + | |
| 2111 | + | |
2111 | 2112 |
| |
2112 | 2113 |
| |
2113 | 2114 |
| |
| |||
2117 | 2118 |
| |
2118 | 2119 |
| |
2119 | 2120 |
| |
2120 |
| - | |
| 2121 | + | |
2121 | 2122 |
| |
2122 | 2123 |
| |
2123 | 2124 |
| |
|
Lines changed: 12 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
713 | 713 |
| |
714 | 714 |
| |
715 | 715 |
| |
716 |
| - | |
| 716 | + | |
| 717 | + | |
717 | 718 |
| |
718 | 719 |
| |
719 | 720 |
| |
| |||
804 | 805 |
| |
805 | 806 |
| |
806 | 807 |
| |
807 |
| - | |
| 808 | + | |
808 | 809 |
| |
809 | 810 |
| |
810 | 811 |
| |
| |||
817 | 818 |
| |
818 | 819 |
| |
819 | 820 |
| |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
820 | 829 |
| |
821 | 830 |
| |
822 | 831 |
| |
|
Lines changed: 14 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
210 | 210 |
| |
211 | 211 |
| |
212 | 212 |
| |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
| 213 | + | |
217 | 214 |
| |
218 | 215 |
| |
219 | 216 |
| |
220 | 217 |
| |
221 | 218 |
| |
222 | 219 |
| |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
223 | 232 |
| |
224 | 233 |
| |
225 | 234 |
| |
|
Lines changed: 10 additions & 39 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
505 | 505 |
| |
506 | 506 |
| |
507 | 507 |
| |
508 |
| - | |
509 |
| - | |
| 508 | + | |
510 | 509 |
| |
511 | 510 |
| |
512 | 511 |
| |
513 | 512 |
| |
514 |
| - | |
515 | 513 |
| |
516 | 514 |
| |
517 | 515 |
| |
518 | 516 |
| |
519 | 517 |
| |
520 | 518 |
| |
521 |
| - | |
| 519 | + | |
522 | 520 |
| |
523 | 521 |
| |
524 | 522 |
| |
| |||
547 | 545 |
| |
548 | 546 |
| |
549 | 547 |
| |
550 |
| - | |
551 |
| - | |
552 | 548 |
| |
553 |
| - | |
554 |
| - | |
555 |
| - | |
556 |
| - | |
557 |
| - | |
558 |
| - | |
559 |
| - | |
560 |
| - | |
561 |
| - | |
562 |
| - | |
563 |
| - | |
564 |
| - | |
565 |
| - | |
566 |
| - | |
567 |
| - | |
| 549 | + | |
568 | 550 |
| |
569 | 551 |
| |
570 | 552 |
| |
571 | 553 |
| |
572 |
| - | |
| 554 | + | |
573 | 555 |
| |
574 |
| - | |
| 556 | + | |
575 | 557 |
| |
576 |
| - | |
577 |
| - | |
578 |
| - | |
579 |
| - | |
580 |
| - | |
581 |
| - | |
582 |
| - | |
583 |
| - | |
584 |
| - | |
585 |
| - | |
586 |
| - | |
587 |
| - | |
588 |
| - | |
589 |
| - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
590 | 561 |
| |
591 | 562 |
| |
| 563 | + | |
592 | 564 |
| |
593 | 565 |
| |
594 | 566 |
| |
595 |
| - | |
596 | 567 |
| |
597 | 568 |
| |
598 | 569 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
206 | 206 |
| |
207 | 207 |
| |
208 | 208 |
| |
| 209 | + | |
209 | 210 |
| |
210 | 211 |
| |
211 | 212 |
| |
|
0 commit comments
Comments
(0)