]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Disallow MERGE cleanly for foreign partitions
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Sat, 15 Oct 2022 17:24:26 +0000 (19:24 +0200)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Sat, 15 Oct 2022 17:24:26 +0000 (19:24 +0200)
commit16d11d68437a6a37af1fea08d4a29ef463f0d62c
treeb4de06bc82c7370144dbfd510c74191e304c3af6
parent27ca0bce5f41cecc3b219cc9d675239a79d7562a
Disallow MERGE cleanly for foreign partitions

While directly targetting a foreign table with MERGE was already
expressly forbidden, we failed to catch the case of a partitioned table
that has a foreign table as a partition; and the result if you try is an
incomprehensible error.  Fix that by adding a specific check.

Backpatch to 15.

Reported-by: Tatsuhiro Nakamori <bt22nakamorit@oss.nttdata.com>
Discussion: https://postgr.es/m/bt22nakamorit@oss.nttdata.com
contrib/postgres_fdw/expected/postgres_fdw.out
contrib/postgres_fdw/sql/postgres_fdw.sql
src/backend/optimizer/plan/createplan.c