This is an automated email from the ASF dual-hosted git repository. reshke pushed a commit to branch REL_2_STABLE in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 19c29311e4b051a1284c76a1d209d91a998e56d5 Author: Etsuro Fujita <[email protected]> AuthorDate: Fri Nov 4 19:15:03 2022 +0900 Correct error message for row-level triggers with transition tables on partitioned tables. "Triggers on partitioned tables cannot have transition tables." is incorrect as we allow statement-level triggers on partitioned tables to have transition tables. This has been wrong since commit 86f575948; back-patch to v11 where that commit came in. Reviewed by Tom Lane. Discussion: https://postgr.es/m/CAPmGK17gk4vXLzz2iG%2BG4LWRWCoVyam70nZ3OuGm1hMJwDrhcg%40mail.gmail.com --- src/backend/commands/trigger.c | 2 +- src/test/regress/expected/triggers.out | 2 +- src/test/singlenode_regress/expected/triggers.out | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 57a258102c5..b52c35fe6b7 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -254,7 +254,7 @@ CreateTriggerFiringOn(CreateTrigStmt *stmt, const char *queryString, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("\"%s\" is a partitioned table", RelationGetRelationName(rel)), - errdetail("Triggers on partitioned tables cannot have transition tables."))); + errdetail("ROW triggers with transition tables are not supported on partitioned tables."))); } } else if (rel->rd_rel->relkind == RELKIND_VIEW) diff --git a/src/test/regress/expected/triggers.out b/src/test/regress/expected/triggers.out index c86a5d265c4..bf73f14b1d0 100644 --- a/src/test/regress/expected/triggers.out +++ b/src/test/regress/expected/triggers.out @@ -1898,7 +1898,7 @@ create trigger failed after update on parted_trig referencing old table as old_table for each row execute procedure trigger_nothing(); ERROR: "parted_trig" is a partitioned table -DETAIL: Triggers on partitioned tables cannot have transition tables. +DETAIL: ROW triggers with transition tables are not supported on partitioned tables. drop table parted_trig; -- -- Verify trigger creation for partitioned tables, and drop behavior diff --git a/src/test/singlenode_regress/expected/triggers.out b/src/test/singlenode_regress/expected/triggers.out index 2c2cd5c351a..4bd385a7875 100644 --- a/src/test/singlenode_regress/expected/triggers.out +++ b/src/test/singlenode_regress/expected/triggers.out @@ -1913,7 +1913,7 @@ create trigger failed after update on parted_trig referencing old table as old_table for each row execute procedure trigger_nothing(); ERROR: "parted_trig" is a partitioned table -DETAIL: Triggers on partitioned tables cannot have transition tables. +DETAIL: ROW triggers with transition tables are not supported on partitioned tables. drop table parted_trig; -- -- Verify trigger creation for partitioned tables, and drop behavior --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
