From 86f575948c773b0ec5b0f27066e37dd93a7f0a96 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Fri, 23 Mar 2018 10:48:22 -0300 Subject: Allow FOR EACH ROW triggers on partitioned tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, FOR EACH ROW triggers were not allowed in partitioned tables. Now we allow AFTER triggers on them, and on trigger creation we cascade to create an identical trigger in each partition. We also clone the triggers to each partition that is created or attached later. This means that deferred unique keys are allowed on partitioned tables, too. Author: Álvaro Herrera Reviewed-by: Peter Eisentraut, Simon Riggs, Amit Langote, Robert Haas, Thomas Munro Discussion: https://postgr.es/m/20171229225319.ajltgss2ojkfd3kp@alvherre.pgsql --- src/backend/commands/typecmds.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/backend/commands/typecmds.c') diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index e375af4cd01..25221965e9e 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -3153,6 +3153,7 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, false, /* Is Deferrable */ false, /* Is Deferred */ !constr->skip_validation, /* Is Validated */ + InvalidOid, /* no parent constraint */ InvalidOid, /* not a relation constraint */ NULL, 0, -- cgit v1.2.3