]> git.ipfire.org Git - thirdparty/postgresql.git/commit
postgres_fdw: Disable batch insert when BEFORE ROW INSERT triggers exist.
authorEtsuro Fujita <efujita@postgresql.org>
Thu, 21 Apr 2022 06:30:02 +0000 (15:30 +0900)
committerEtsuro Fujita <efujita@postgresql.org>
Thu, 21 Apr 2022 06:30:02 +0000 (15:30 +0900)
commit89d349b0a0239504325e5f63755f3bc1e1742478
tree87c5e5d371d040625ae3b7c3f7442624377ad3fb
parente4521841a1ee6917633bd28b34496c1627588731
postgres_fdw: Disable batch insert when BEFORE ROW INSERT triggers exist.

Previously, we allowed this, but such triggers might query the table to
insert into and act differently if the tuples that have already been
processed and prepared for insertion are not there, so disable it in
such cases.

Back-patch to v14 where batch insert was added.

Discussion: https://postgr.es/m/CAPmGK16_uPqsmgK0-LpLSUk54_BoK13bPrhxhfjSoSTVz414hA%40mail.gmail.com
contrib/postgres_fdw/expected/postgres_fdw.out
contrib/postgres_fdw/postgres_fdw.c
contrib/postgres_fdw/sql/postgres_fdw.sql