mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-20 21:23:22 +02:00
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
This commit is contained in:
parent
387e059f8e
commit
8117326444
@ -262,7 +262,7 @@ CreateTriggerFiringOn(CreateTrigStmt *stmt, const char *queryString,
|
|||||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||||
errmsg("\"%s\" is a partitioned table",
|
errmsg("\"%s\" is a partitioned table",
|
||||||
RelationGetRelationName(rel)),
|
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)
|
else if (rel->rd_rel->relkind == RELKIND_VIEW)
|
||||||
|
@ -2046,7 +2046,7 @@ create trigger failed after update on parted_trig
|
|||||||
referencing old table as old_table
|
referencing old table as old_table
|
||||||
for each row execute procedure trigger_nothing();
|
for each row execute procedure trigger_nothing();
|
||||||
ERROR: "parted_trig" is a partitioned table
|
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;
|
drop table parted_trig;
|
||||||
--
|
--
|
||||||
-- Verify trigger creation for partitioned tables, and drop behavior
|
-- Verify trigger creation for partitioned tables, and drop behavior
|
||||||
|
Loading…
Reference in New Issue
Block a user