Re: ON CONFLICT issie detected

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Irina Mileva <imileva(at)transfermate(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: ON CONFLICT issie detected
Date: 2017-04-21 16:15:32
Message-ID: CAH2-WzkCxJRJ4BW_fRuhkXxFQHGmv_WZEbs20jaXzFeDDHDFig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Apr 21, 2017 at 4:40 AM, Irina Mileva <imileva(at)transfermate(dot)com> wrote:
> “ON CONFLICT (columnName) DO UPDATE” do NOT works with FOREIGN TABLES
>
> Returns:
>
> “ERROR: there is no unique or exclusion constraint matching the ON CONFLICT
> specification”

It's unsupported, because there is no such thing as a foreign unique
constraint. Only ON CONFLICT DO NOTHING will work against a foreign
table, and only when an arbiter constraint is not inferred.

See the docs on INSERT.

--
Peter Geoghegan

VMware vCenter Server
https://www.vmware.com/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Irina Mileva 2017-04-21 17:44:01 Re: ON CONFLICT issie detected
Previous Message Tom Lane 2017-04-21 14:36:15 Re: Incorrect type in pg_cast causes Postmaster to core dump