Skip to content

Commit 8c71467

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 3e77b2e commit 8c71467

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
@@ -264,7 +264,7 @@ CreateTriggerFiringOn(CreateTrigStmt *stmt, const char *queryString,
264264
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
265265
errmsg("\"%s\" is a partitioned table",
266266
RelationGetRelationName(rel)),
267-
errdetail("Triggers on partitioned tables cannot have transition tables.")));
267+
errdetail("ROW triggers with transition tables are not supported on partitioned tables.")));
268268
}
269269
}
270270
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
@@ -2046,7 +2046,7 @@ create trigger failed after update on parted_trig
20462046
referencing old table as old_table
20472047
for each row execute procedure trigger_nothing();
20482048
ERROR: "parted_trig" is a partitioned table
2049-
DETAIL: Triggers on partitioned tables cannot have transition tables.
2049+
DETAIL: ROW triggers with transition tables are not supported on partitioned tables.
20502050
drop table parted_trig;
20512051
--
20522052
-- Verify trigger creation for partitioned tables, and drop behavior

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy