From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marco Colombo <ing.marco.colombo@gmail.com>
Cc: David Fetter <david@fetter.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14351: Upsert not working in case of partitioned tables
Date: Thu, 06 Oct 2016 13:56:56 -0400
Message-ID: <27411.1475776616@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOYH936K=CsUozcVQAfMpwq+eZr1vTEyZy3g3RtWHZbm_ykQnQ@mail.gmail.com>
References: <20161003142100.27241.67538@wrigleys.postgresql.org>
<20161003200826.GA11863@fetter.org>
<CAOYH935knweWfz65hmjLDmOn0qzN_=QfSe0_S4wPBFaH3BjJog@mail.gmail.com>
<CAOYH936K=CsUozcVQAfMpwq+eZr1vTEyZy3g3RtWHZbm_ykQnQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Marco Colombo <ing.marco.colombo@gmail.com> writes:
> Hi, are information provided sufficient to reproduce the problem?
I think you're hoping for a feature that doesn't exist, and is unlikely to
do so anytime soon. The INSERT ... ON CONFLICT clause describes what to
do in case the unique constraint on table dh_1 is violated. But it isn't,
since indeed no insert into dh_1 happens at all. Some other constraint on
some other table is being violated. The fact that that other insert is
being driven from an ON-INSERT trigger belonging to dh_1 isn't enough to
make a connection --- after all, that trigger could do anything at all.
If we had a true partitioning feature where the connection between the
table insertions was hardwired into the system (rather than emerging from
user-written triggers) and the partitions were all guaranteed to have
identical unique constraints, then it would be reasonable to expect INSERT
... ON CONFLICT to handle conflicts within the partitions. But we're
still some ways away from having that.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, ing.marco.colombo@gmail.com, david@fetter.org
Subject: Re: BUG #14351: Upsert not working in case of partitioned tables
In-Reply-To: <27411.1475776616@sss.pgh.pa.us>
References: <20161003142100.27241.67538@wrigleys.postgresql.org> <20161003200826.GA11863@fetter.org> <CAOYH935knweWfz65hmjLDmOn0qzN_=QfSe0_S4wPBFaH3BjJog@mail.gmail.com> <CAOYH936K=CsUozcVQAfMpwq+eZr1vTEyZy3g3RtWHZbm_ykQnQ@mail.gmail.com> <27411.1475776616@sss.pgh.pa.us>
* 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