aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtsuro Fujita <efujita@postgresql.org>2022-11-04 19:15:00 +0900
committerEtsuro Fujita <efujita@postgresql.org>2022-11-04 19:15:00 +0900
commit8c7146790811ac4eee23fab2226db14b636e1ac5 (patch)
treec59bd0b5a11a7f92fb42d29ba708b0e244f06a8c
parent3e77b2eb3466aff9fe19e209ebc0d899ea869494 (diff)
downloadpostgresql-8c7146790811ac4eee23fab2226db14b636e1ac5.tar.gz
postgresql-8c7146790811ac4eee23fab2226db14b636e1ac5.zip
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
-rw-r--r--src/backend/commands/trigger.c2
-rw-r--r--src/test/regress/expected/triggers.out2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index 182e6161e0c..e64145e710c 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -264,7 +264,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 8b8eadd1812..6d80ab1a6d8 100644
--- a/src/test/regress/expected/triggers.out
+++ b/src/test/regress/expected/triggers.out
@@ -2046,7 +2046,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