Fix oversight in FindTriggerIncompatibleWithInheritance.
Etsuro Fujita <efujita@postgresql.org>
Fix oversight in FindTriggerIncompatibleWithInheritance. This function is called from ATExecAttachPartition/ATExecAddInherit, which prevent tables with row-level triggers with transition tables from becoming partitions or inheritance children, to check if there is such a trigger on the given table, but failed to check if a found trigger is row-level, causing the caller functions to needlessly prevent a table with only a statement-level trigger with transition tables from becoming a partition or inheritance child. Repair. Oversight in commit 501ed02cf. Author: Etsuro Fujita <etsuro.fujita@gmail.com> Discussion: https://postgr.es/m/CAPmGK167mXzwzzmJ_0YZ3EZrbwiCxtM1vogH_8drqsE6PtxRYw%40mail.gmail.com Backpatch-through: 13
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/trigger.c | modified | +2 −0 |
| src/test/regress/expected/triggers.out | modified | +8 −0 |
| src/test/regress/sql/triggers.sql | modified | +10 −0 |
Discussion
- Odd behavior of statement triggers with transition tables on partitions 2 messages · 2025-07-15 → 2025-08-08