- Notifications
You must be signed in to change notification settings - Fork28
Commit123cc69
committed
Create action triggers when partitions are detached
Detaching a partition from a partitioned table that's constrained byforeign keys requires additional action triggers on the referenced side;otherwise, DELETE/UPDATE actions there fail to notice rows in the tablethat was partition, and so are incorrectly allowed through. With thiscommit, those triggers are now created. Conversely, when a table thathas a foreign key is attached as a partition to a table that also hasthe same foreign key, those action triggers are no longer needed, so weremove them.Add a minimal test case verifying (part of) this.Authors: Amit Langote, Álvaro HerreraDiscussion:https://postgr.es/m/f2b8ead5-4131-d5a8-8016-2ea0a31250af@lab.ntt.co.jp1 parenta747430 commit123cc69
File tree
3 files changed
+113
-5
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+113
-5
lines changedLines changed: 69 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7945 | 7945 |
| |
7946 | 7946 |
| |
7947 | 7947 |
| |
| 7948 | + | |
| 7949 | + | |
| 7950 | + | |
| 7951 | + | |
7948 | 7952 |
| |
7949 | 7953 |
| |
7950 | 7954 |
| |
| |||
7996 | 8000 |
| |
7997 | 8001 |
| |
7998 | 8002 |
| |
7999 |
| - | |
| 8003 | + | |
| 8004 | + | |
| 8005 | + | |
| 8006 | + | |
| 8007 | + | |
| 8008 | + | |
| 8009 | + | |
| 8010 | + | |
| 8011 | + | |
| 8012 | + | |
| 8013 | + | |
| 8014 | + | |
| 8015 | + | |
| 8016 | + | |
| 8017 | + | |
| 8018 | + | |
| 8019 | + | |
| 8020 | + | |
| 8021 | + | |
| 8022 | + | |
| 8023 | + | |
| 8024 | + | |
| 8025 | + | |
| 8026 | + | |
| 8027 | + | |
| 8028 | + | |
| 8029 | + | |
| 8030 | + | |
| 8031 | + | |
| 8032 | + | |
| 8033 | + | |
| 8034 | + | |
| 8035 | + | |
8000 | 8036 |
| |
8001 | 8037 |
| |
8002 | 8038 |
| |
| |||
15211 | 15247 |
| |
15212 | 15248 |
| |
15213 | 15249 |
| |
15214 |
| - | |
| 15250 | + | |
| 15251 | + | |
| 15252 | + | |
| 15253 | + | |
15215 | 15254 |
| |
15216 | 15255 |
| |
15217 | 15256 |
| |
15218 | 15257 |
| |
15219 | 15258 |
| |
| 15259 | + | |
| 15260 | + | |
15220 | 15261 |
| |
15221 | 15262 |
| |
15222 | 15263 |
| |
15223 | 15264 |
| |
| 15265 | + | |
| 15266 | + | |
| 15267 | + | |
| 15268 | + | |
| 15269 | + | |
| 15270 | + | |
| 15271 | + | |
| 15272 | + | |
| 15273 | + | |
15224 | 15274 |
| |
| 15275 | + | |
15225 | 15276 |
| |
15226 | 15277 |
| |
| 15278 | + | |
| 15279 | + | |
| 15280 | + | |
| 15281 | + | |
| 15282 | + | |
| 15283 | + | |
| 15284 | + | |
| 15285 | + | |
| 15286 | + | |
| 15287 | + | |
| 15288 | + | |
| 15289 | + | |
| 15290 | + | |
| 15291 | + | |
| 15292 | + | |
| 15293 | + | |
15227 | 15294 |
| |
15228 | 15295 |
| |
15229 | 15296 |
| |
|
Lines changed: 26 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1860 | 1860 |
| |
1861 | 1861 |
| |
1862 | 1862 |
| |
| 1863 | + | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
1863 | 1887 |
| |
1864 |
| - | |
1865 |
| - | |
| 1888 | + | |
| 1889 | + | |
1866 | 1890 |
|
Lines changed: 18 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1324 | 1324 |
| |
1325 | 1325 |
| |
1326 | 1326 |
| |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
1327 | 1344 |
| |
1328 |
| - | |
| 1345 | + | |
1329 | 1346 |
|
0 commit comments
Comments
(0)