From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Ignore whole-rows in INSERT/CONFLICT with partitioned tables
Date: Mon, 16 Apr 2018 19:08:01 +0000
Message-ID: <E1f89Tt-0001TP-UR@gemulon.postgresql.org> (raw)
Ignore whole-rows in INSERT/CONFLICT with partitioned tables
We had an Assert() preventing whole-row expressions from being used in
the SET clause of INSERT ON CONFLICT, but it seems unnecessary, given
some tests, so remove it. Add a new test to exercise the case.
Still at ExecInitPartitionInfo, we used map_partition_varattnos (which
constructs an attribute map, then calls map_variable_attnos) using
the same two relations many times in different expressions and with
different parameters. Constructing the map over and over is a waste.
To avoid this repeated work, construct the map once, and use
map_variable_attnos() directly instead.
Author: Amit Langote, per comments by me (Álvaro)
Discussion: https://postgr.es/m/20180326142016.m4st5e34chrzrknk@alvherre.pgsql
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/158b7bc6d77948d2f474dc9f2777c87f81d1365a
Modified Files
--------------
src/backend/executor/execPartition.c | 121 +++++++++++++++++++-------
src/test/regress/expected/insert_conflict.out | 16 ++++
src/test/regress/sql/insert_conflict.sql | 18 ++++
3 files changed, 125 insertions(+), 30 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Ignore whole-rows in INSERT/CONFLICT with partitioned tables
In-Reply-To: <E1f89Tt-0001TP-UR@gemulon.postgresql.org>
References: <E1f89Tt-0001TP-UR@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox