Commit 79edb29
committed
Fix overlooked relcache invalidation in ALTER TABLE ... ALTER CONSTRAINT.
When altering the deferredness state of a foreign key constraint, we
correctly updated the catalogs and then invalidated the relcache state for
the target relation ... but that's not the only relation with relevant
triggers. Must invalidate the other table as well, or the state change
fails to take effect promptly for operations triggered on the other table.
Per bug #13224 from Christian Ullrich.
In passing, reorganize regression test case for this feature so that it
isn't randomly injected into the middle of an unrelated test sequence.
Oversight in commit f177cbf. Back-patch
to 9.4 where the faulty code was added.1 parent 70fac48 commit 79edb29
File tree
3 files changed
+70
-42
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+70
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6308 | 6308 | | |
6309 | 6309 | | |
6310 | 6310 | | |
| 6311 | + | |
6311 | 6312 | | |
6312 | 6313 | | |
6313 | 6314 | | |
6314 | 6315 | | |
6315 | 6316 | | |
6316 | | - | |
6317 | 6317 | | |
6318 | 6318 | | |
6319 | 6319 | | |
| |||
6359 | 6359 | | |
6360 | 6360 | | |
6361 | 6361 | | |
6362 | | - | |
| 6362 | + | |
6363 | 6363 | | |
6364 | 6364 | | |
6365 | 6365 | | |
| 6366 | + | |
6366 | 6367 | | |
6367 | 6368 | | |
6368 | 6369 | | |
| |||
6395 | 6396 | | |
6396 | 6397 | | |
6397 | 6398 | | |
| 6399 | + | |
| 6400 | + | |
6398 | 6401 | | |
6399 | 6402 | | |
| 6403 | + | |
| 6404 | + | |
| 6405 | + | |
| 6406 | + | |
| 6407 | + | |
| 6408 | + | |
6400 | 6409 | | |
6401 | 6410 | | |
6402 | 6411 | | |
| |||
6413 | 6422 | | |
6414 | 6423 | | |
6415 | 6424 | | |
6416 | | - | |
| 6425 | + | |
| 6426 | + | |
| 6427 | + | |
| 6428 | + | |
6417 | 6429 | | |
6418 | 6430 | | |
| 6431 | + | |
| 6432 | + | |
| 6433 | + | |
| 6434 | + | |
6419 | 6435 | | |
6420 | 6436 | | |
6421 | 6437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
1135 | | - | |
1136 | | - | |
1137 | | - | |
1138 | | - | |
1139 | | - | |
1140 | | - | |
1141 | | - | |
1142 | | - | |
1143 | | - | |
1144 | 1135 | | |
1145 | 1136 | | |
1146 | 1137 | | |
| |||
1151 | 1142 | | |
1152 | 1143 | | |
1153 | 1144 | | |
1154 | | - | |
1155 | | - | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | 1145 | | |
1165 | 1146 | | |
1166 | 1147 | | |
| |||
1198 | 1179 | | |
1199 | 1180 | | |
1200 | 1181 | | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
1201 | 1206 | | |
1202 | 1207 | | |
1203 | 1208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | 821 | | |
829 | 822 | | |
830 | 823 | | |
| |||
838 | 831 | | |
839 | 832 | | |
840 | 833 | | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | 834 | | |
855 | 835 | | |
856 | 836 | | |
| |||
900 | 880 | | |
901 | 881 | | |
902 | 882 | | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
903 | 910 | | |
904 | 911 | | |
905 | 912 | | |
| |||
0 commit comments