Re: UPSERT on partition - Mailing list pgsql-hackers

From Andres Freund
Subject Re: UPSERT on partition
Date
Msg-id 20150624142915.GB8902@alap3.anarazel.de
Whole thread Raw
In response to UPSERT on partition  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: UPSERT on partition  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

On 2015-06-24 23:05:45 +0900, Fujii Masao wrote:
> INSERT ON CONFLICT DO UPDATE doesn't seem to work on the current partitioning
> mechanism. For example, in the following SQL commands, the last UPSERT command
> would fail with an error. The error message is

I think that's pretty much inevitable without baking in touple routing
into the core system and supporting unique-constraints that span
partitions. In other words, I don't think this is upsert's fault.

> Or we should just treat it as a limitation of UPSERT and add that document?

I think we should (IIRC there's actually already something) rather
document it as a limitation of the partitioning approach.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: UPSERT on partition
Next
From: Fujii Masao
Date:
Subject: Re: Support for N synchronous standby servers - take 2