8000 Correct error message for row-level triggers with transition tables o… · postgres/postgres@6f47756 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6f47756

Browse files
author
Etsuro Fujita
committed
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 86f5759; back-patch to v11 where that commit came in. Reviewed by Tom Lane. Discussion: https://postgr.es/m/CAPmGK17gk4vXLzz2iG%2BG4LWRWCoVyam70nZ3OuGm1hMJwDrhcg%40mail.gmail.com
1 parent ed019b5 commit 6f47756

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/commands/trigger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ CreateTriggerFiringOn(CreateTrigStmt *stmt, const char *queryString,
261261
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
262262
errmsg("\"%s\" is a partitioned table",
263263
RelationGetRelationName(rel)),
264-
errdetail("Triggers on partitioned tables cannot have transition tables.")));
264+
errdetail("ROW triggers with transition tables are not supported on partitioned tables.")));
265265
}
266266
}
267267
else if (rel->rd_rel->relkind == RELKIND_VIEW)

src/test/regress/expected/triggers.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1968,7 +1968,7 @@ create trigger failed after update on parted_trig
19681968
referencing old table as old_table
19691969
for each row execute procedure trigger_nothing();
19701970
ERROR: "parted_trig" is a partitioned table
1971-
DETAIL: Triggers on partitioned tables cannot have transition tables.
1971+
DETAIL: ROW triggers with transition tables are not supported on partitioned tables.
19721972
drop table parted_trig;
19731973
--
19741974
-- Verify trigger creation for partitioned tables, and drop behavior

0 commit comments

Comments
 (0)
0