aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2021-01-28 16:56:07 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2021-01-28 16:56:07 -0300
commit6f5c8a8ec23f8ab00da4d2b77bfc8af2a578c4d3 (patch)
tree3c3c1391b7119830ea9418ca982de95bb9058c08 /doc/src
parent1d9351a87c9a9e82c7091aab03d9299982670ce0 (diff)
downloadpostgresql-6f5c8a8ec23f8ab00da4d2b77bfc8af2a578c4d3.tar.gz
postgresql-6f5c8a8ec23f8ab00da4d2b77bfc8af2a578c4d3.zip
Remove bogus restriction from BEFORE UPDATE triggers
In trying to protect the user from inconsistent behavior, commit 487e9861d0cf "Enable BEFORE row-level triggers for partitioned tables" tried to prevent BEFORE UPDATE FOR EACH ROW triggers from moving the row from one partition to another. However, it turns out that the restriction is wrong in two ways: first, it fails spuriously, preventing valid situations from working, as in bug #16794; and second, they don't protect from any misbehavior, because tuple routing would cope anyway. Fix by removing that restriction. We keep the same restriction on BEFORE INSERT FOR EACH ROW triggers, though. It is valid and useful there. In the future we could remove it by having tuple reroute work for inserts as it does for updates. Backpatch to 13. Author: Álvaro Herrera <alvherre@alvh.no-ip.org> Reported-by: Phillip Menke <pg@pmenke.de> Discussion: https://postgr.es/m/16794-350a655580fbb9ae@postgresql.org
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ddl.sgml4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 02d2f428651..1e9a4625cc6 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -4027,8 +4027,8 @@ ALTER INDEX measurement_city_id_logdate_key
<listitem>
<para>
- <literal>BEFORE ROW</literal> triggers cannot change which partition
- is the final destination for a new row.
+ <literal>BEFORE ROW</literal> triggers on <literal>INSERT</literal>
+ cannot change which partition is the final destination for a new row.
</para>
</listitem>