Fix oversight in FindTriggerIncompatibleWithInheritance.
authorEtsuro Fujita <[email protected]>
Fri, 8 Aug 2025 08:35:02 +0000 (17:35 +0900)
committerEtsuro Fujita <[email protected]>
Fri, 8 Aug 2025 08:35:02 +0000 (17:35 +0900)
commit3863c6fb696cf57718483a3bf0abbf05e382abe1
tree59efa5bbb79fe323c2f802158c7c08648084eebb
parent9cca445dfd2c39c1dbc031bb1596c67594b54668
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 <[email protected]>
Discussion: https://postgr.es/m/CAPmGK167mXzwzzmJ_0YZ3EZrbwiCxtM1vogH_8drqsE6PtxRYw%40mail.gmail.com
Backpatch-through: 13
src/backend/commands/trigger.c
src/test/regress/expected/triggers.out
src/test/regress/sql/triggers.sql