Re: Partitioning vs ON CONFLICT

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Thom Brown <thom(at)linux(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: Partitioning vs ON CONFLICT
Date: 2017-02-16 15:03:54
Message-ID: CANP8+j+SgSShsRNFoRPXh1c0yp3D1R=H-uUkQotnAG+COVapow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 16 February 2017 at 14:54, Thom Brown <thom(at)linux(dot)com> wrote:
> Hi,
>
> At the moment, partitioned tables have a restriction that prevents
> them allowing INSERT ... ON CONFLICT ... statements:
>
> postgres=# INSERT INTO cities SELECT 1, 'Crawley',105000 ON CONFLICT
> (city_id) DO NOTHING;
> ERROR: ON CONFLICT clause is not supported with partitioned tables
>
> Why do we have such a restriction? And what would it take to remove it?

Partitioned tables don't yet support a global unique constraint that
would be required for support of ON CONFLICT processing.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-02-16 15:07:28 Re: Parallel Append implementation
Previous Message Surafel Temsgen 2017-02-16 14:58:52 Re: New CORRESPONDING clause design