forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc1b9ec2
committed
Add system catalog columns pg_constraint.conindid and pg_trigger.tgconstrindid.
conindid is the index supporting a constraint. We can use this not only forunique/primary-key constraints, but also foreign-key constraints, whichdepend on the unique index that constrains the referenced columns.tgconstrindid is just copied from the constraint's conindid field, or iszero for triggers not associated with constraints.This is mainly intended as infrastructure for upcoming patches, but it hassome virtue in itself, since it exposes a relationship that you formerlyhad to grovel in pg_depend to determine. I simplified one information_schemaview accordingly. (There is a pg_dump query that could also use conindid,but I left it alone because it wasn't clear it'd get any faster.)1 parent3694250 commitc1b9ec2
File tree
15 files changed
+120
-78
lines changed- doc/src/sgml
- src
- backend
- catalog
- commands
- tcop
- include
- catalog
- commands
- utils
15 files changed
+120
-78
lines changedLines changed: 17 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
1748 | 1748 |
| |
1749 | 1749 |
| |
1750 | 1750 |
| |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
1751 | 1759 |
| |
1752 | 1760 |
| |
1753 | 1761 |
| |
| |||
4510 | 4518 |
| |
4511 | 4519 |
| |
4512 | 4520 |
| |
| 4521 | + | |
| 4522 | + | |
| 4523 | + | |
| 4524 | + | |
| 4525 | + | |
| 4526 | + | |
| 4527 | + | |
4513 | 4528 |
| |
4514 | 4529 |
| |
4515 | 4530 |
| |
| |||
4560 | 4575 |
| |
4561 | 4576 |
| |
4562 | 4577 |
| |
| 4578 | + | |
4563 | 4579 |
| |
4564 | 4580 |
| |
4565 | 4581 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
486 | 486 |
| |
487 | 487 |
| |
488 | 488 |
| |
| 489 | + | |
489 | 490 |
| |
490 | 491 |
| |
491 | 492 |
| |
| |||
497 | 498 |
| |
498 | 499 |
| |
499 | 500 |
| |
500 |
| - | |
| 501 | + | |
501 | 502 |
| |
502 | 503 |
| |
503 | 504 |
| |
|
Lines changed: 2 additions & 2 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 |
| |
| |||
1659 | 1659 |
| |
1660 | 1660 |
| |
1661 | 1661 |
| |
| 1662 | + | |
1662 | 1663 |
| |
1663 | 1664 |
| |
1664 | 1665 |
| |
| |||
1668 | 1669 |
| |
1669 | 1670 |
| |
1670 | 1671 |
| |
1671 |
| - | |
1672 | 1672 |
| |
1673 | 1673 |
| |
1674 | 1674 |
| |
|
Lines changed: 2 additions & 2 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 |
| |
| |||
732 | 732 |
| |
733 | 733 |
| |
734 | 734 |
| |
| 735 | + | |
735 | 736 |
| |
736 | 737 |
| |
737 | 738 |
| |
| |||
741 | 742 |
| |
742 | 743 |
| |
743 | 744 |
| |
744 |
| - | |
745 | 745 |
| |
746 | 746 |
| |
747 | 747 |
| |
|
Lines changed: 4 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
51 |
| - | |
52 |
| - | |
53 |
| - | |
54 |
| - | |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 | 47 |
| |
59 | 48 |
| |
60 | 49 |
| |
| |||
957 | 946 |
| |
958 | 947 |
| |
959 | 948 |
| |
960 |
| - | |
961 |
| - | |
| 949 | + | |
962 | 950 |
| |
963 | 951 |
| |
964 | 952 |
| |
965 | 953 |
| |
966 | 954 |
| |
967 | 955 |
| |
968 |
| - | |
| 956 | + | |
| 957 | + | |
969 | 958 |
| |
970 | 959 |
| |
971 | 960 |
| |
|
Lines changed: 7 additions & 4 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 |
| |
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
| 52 | + | |
52 | 53 |
| |
53 | 54 |
| |
54 | 55 |
| |
| |||
58 | 59 |
| |
59 | 60 |
| |
60 | 61 |
| |
61 |
| - | |
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
| |||
144 | 144 |
| |
145 | 145 |
| |
146 | 146 |
| |
| 147 | + | |
147 | 148 |
| |
148 | 149 |
| |
149 | 150 |
| |
| |||
273 | 274 |
| |
274 | 275 |
| |
275 | 276 |
| |
276 |
| - | |
| 277 | + | |
277 | 278 |
| |
278 | 279 |
| |
279 | 280 |
| |
280 |
| - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
281 | 284 |
| |
282 | 285 |
| |
283 | 286 |
| |
|
Lines changed: 18 additions & 12 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 |
| |
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
| 155 | + | |
155 | 156 |
| |
156 | 157 |
| |
157 | 158 |
| |
| |||
247 | 248 |
| |
248 | 249 |
| |
249 | 250 |
| |
250 |
| - | |
| 251 | + | |
| 252 | + | |
251 | 253 |
| |
252 |
| - | |
| 254 | + | |
253 | 255 |
| |
254 | 256 |
| |
255 | 257 |
| |
| |||
2915 | 2917 |
| |
2916 | 2918 |
| |
2917 | 2919 |
| |
| 2920 | + | |
2918 | 2921 |
| |
2919 | 2922 |
| |
2920 | 2923 |
| |
| |||
4819 | 4822 |
| |
4820 | 4823 |
| |
4821 | 4824 |
| |
| 4825 | + | |
4822 | 4826 |
| |
4823 | 4827 |
| |
4824 | 4828 |
| |
| |||
4828 | 4832 |
| |
4829 | 4833 |
| |
4830 | 4834 |
| |
4831 |
| - | |
4832 | 4835 |
| |
4833 | 4836 |
| |
4834 | 4837 |
| |
| |||
4838 | 4841 |
| |
4839 | 4842 |
| |
4840 | 4843 |
| |
4841 |
| - | |
| 4844 | + | |
4842 | 4845 |
| |
4843 | 4846 |
| |
4844 | 4847 |
| |
| |||
4852 | 4855 |
| |
4853 | 4856 |
| |
4854 | 4857 |
| |
| 4858 | + | |
4855 | 4859 |
| |
4856 | 4860 |
| |
4857 | 4861 |
| |
| |||
5141 | 5145 |
| |
5142 | 5146 |
| |
5143 | 5147 |
| |
| 5148 | + | |
5144 | 5149 |
| |
5145 | 5150 |
| |
5146 | 5151 |
| |
| |||
5156 | 5161 |
| |
5157 | 5162 |
| |
5158 | 5163 |
| |
| 5164 | + | |
5159 | 5165 |
| |
5160 | 5166 |
| |
5161 | 5167 |
| |
| |||
5209 | 5215 |
| |
5210 | 5216 |
| |
5211 | 5217 |
| |
5212 |
| - | |
| 5218 | + | |
5213 | 5219 |
| |
5214 | 5220 |
| |
5215 | 5221 |
| |
| |||
5237 | 5243 |
| |
5238 | 5244 |
| |
5239 | 5245 |
| |
5240 |
| - | |
| 5246 | + | |
5241 | 5247 |
| |
5242 | 5248 |
| |
5243 | 5249 |
| |
| |||
5248 | 5254 |
| |
5249 | 5255 |
| |
5250 | 5256 |
| |
5251 |
| - | |
| 5257 | + | |
5252 | 5258 |
| |
5253 | 5259 |
| |
5254 | 5260 |
| |
| |||
5267 | 5273 |
| |
5268 | 5274 |
| |
5269 | 5275 |
| |
5270 |
| - | |
5271 |
| - | |
| 5276 | + | |
| 5277 | + | |
5272 | 5278 |
| |
5273 | 5279 |
| |
5274 | 5280 |
| |
| |||
5316 | 5322 |
| |
5317 | 5323 |
| |
5318 | 5324 |
| |
5319 |
| - | |
| 5325 | + | |
5320 | 5326 |
| |
5321 | 5327 |
| |
5322 | 5328 |
| |
| |||
5367 | 5373 |
| |
5368 | 5374 |
| |
5369 | 5375 |
| |
5370 |
| - | |
| 5376 | + | |
5371 | 5377 |
| |
5372 | 5378 |
| |
5373 | 5379 |
| |
|
0 commit comments
Comments
(0)