1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

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
This commit is contained in:
Alvaro Herrera
2020-03-18 18:58:05 -03:00
parent b029395f5e
commit 487e9861d0
8 changed files with 161 additions and 23 deletions

View File

@ -526,7 +526,7 @@ UPDATE OF <replaceable>column_name1</replaceable> [, <replaceable>column_name2</
Creating a row-level trigger on a partitioned table will cause identical
triggers to be created in all its existing partitions; and any partitions
created or attached later will contain an identical trigger, too.
Triggers on partitioned tables may only be <literal>AFTER</literal>.
Triggers on partitioned tables may not be <literal>INSTEAD OF</literal>.
</para>
<para>

View File

@ -116,8 +116,7 @@
operated on, while row-level <literal>AFTER</literal> triggers fire at the end of
the statement (but before any statement-level <literal>AFTER</literal> triggers).
These types of triggers may only be defined on tables and
foreign tables, not views; <literal>BEFORE</literal> row-level triggers may not
be defined on partitioned tables.
foreign tables, not views.
<literal>INSTEAD OF</literal> triggers may only be
defined on views, and only at row level; they fire immediately as each
row in the view is identified as needing to be operated on.