Commit 1fa846f
committed
Fix cloning of row triggers to sub-partitions
When row triggers exist in partitioned partitions that are not either
part of FKs or deferred unique constraints, they are not correctly
cloned to their partitions. That's because they are marked "internal",
and those are purposefully skipped when doing the clone triggers dance.
Fix by relaxing the condition on which internal triggers are skipped.
Amit Langote initially diagnosed the problem and proposed a fix, but I
used a different approach.
Reported-by: Petr Fedorov
Discussion: https://postgr.es/m/6b3f0646-ba8c-b3a9-c62d-1c6651a1920f@phystech.edu1 parent 7c01504 commit 1fa846f
File tree
3 files changed
+90
-15
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+90
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15931 | 15931 | | |
15932 | 15932 | | |
15933 | 15933 | | |
| 15934 | + | |
| 15935 | + | |
| 15936 | + | |
| 15937 | + | |
| 15938 | + | |
| 15939 | + | |
| 15940 | + | |
| 15941 | + | |
| 15942 | + | |
| 15943 | + | |
| 15944 | + | |
| 15945 | + | |
| 15946 | + | |
| 15947 | + | |
| 15948 | + | |
| 15949 | + | |
| 15950 | + | |
| 15951 | + | |
| 15952 | + | |
| 15953 | + | |
| 15954 | + | |
| 15955 | + | |
| 15956 | + | |
| 15957 | + | |
| 15958 | + | |
| 15959 | + | |
| 15960 | + | |
| 15961 | + | |
| 15962 | + | |
| 15963 | + | |
| 15964 | + | |
| 15965 | + | |
| 15966 | + | |
| 15967 | + | |
| 15968 | + | |
| 15969 | + | |
| 15970 | + | |
| 15971 | + | |
| 15972 | + | |
| 15973 | + | |
| 15974 | + | |
| 15975 | + | |
| 15976 | + | |
| 15977 | + | |
| 15978 | + | |
| 15979 | + | |
| 15980 | + | |
| 15981 | + | |
15934 | 15982 | | |
15935 | 15983 | | |
15936 | 15984 | | |
| |||
15971 | 16019 | | |
15972 | 16020 | | |
15973 | 16021 | | |
15974 | | - | |
15975 | | - | |
| 16022 | + | |
| 16023 | + | |
| 16024 | + | |
| 16025 | + | |
| 16026 | + | |
| 16027 | + | |
| 16028 | + | |
| 16029 | + | |
| 16030 | + | |
| 16031 | + | |
| 16032 | + | |
| 16033 | + | |
| 16034 | + | |
| 16035 | + | |
| 16036 | + | |
15976 | 16037 | | |
15977 | 16038 | | |
15978 | 16039 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1981 | 1981 | | |
1982 | 1982 | | |
1983 | 1983 | | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
1984 | 1988 | | |
1985 | 1989 | | |
1986 | | - | |
1987 | | - | |
1988 | | - | |
1989 | | - | |
1990 | | - | |
1991 | | - | |
1992 | | - | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
1993 | 2000 | | |
1994 | 2001 | | |
1995 | 2002 | | |
| |||
2003 | 2010 | | |
2004 | 2011 | | |
2005 | 2012 | | |
2006 | | - | |
2007 | | - | |
2008 | | - | |
2009 | | - | |
2010 | | - | |
2011 | | - | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
2012 | 2022 | | |
2013 | 2023 | | |
2014 | 2024 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1366 | 1366 | | |
1367 | 1367 | | |
1368 | 1368 | | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
1369 | 1373 | | |
1370 | 1374 | | |
1371 | 1375 | | |
| |||
0 commit comments