diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-03-18 18:58:05 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2020-03-18 18:58:05 -0300 |
commit | 487e9861d0cf83e9100ad0d0369147db3ef4ea73 (patch) | |
tree | f3cc3f4e8c89154a4d12800c1d4df86ca0161cc3 /src/backend/commands/tablecmds.c | |
parent | b029395f5e616e0f2b1131b2c7ecb6640f30c055 (diff) | |
download | postgresql-487e9861d0cf83e9100ad0d0369147db3ef4ea73.tar.gz postgresql-487e9861d0cf83e9100ad0d0369147db3ef4ea73.zip |
Enable BEFORE row-level triggers for partitioned tables
... with the limitation that the tuple must remain in the same
partition.
Reviewed-by: Ashutosh Bapat
Discussion: https://postgr.es/m/20200227165158.GA2071@alvherre.pgsql
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 8c33b67c1b5..729025470dc 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -16546,7 +16546,8 @@ CloneRowTriggersToPartition(Relation parent, Relation partition) /* * Complain if we find an unexpected trigger type. */ - if (!TRIGGER_FOR_AFTER(trigForm->tgtype)) + if (!TRIGGER_FOR_BEFORE(trigForm->tgtype) && + !TRIGGER_FOR_AFTER(trigForm->tgtype)) elog(ERROR, "unexpected trigger \"%s\" found", NameStr(trigForm->tgname)); |