ON CONFLICT issie detected
From: Daniel Topalov
Sent: 21 April 2017 14:25
To: Irina Mileva
Subject: ON CONFLICT issue detected
"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"
"ALTER FOREIGN TABLE tableName
ADD CONSTRAINT ConstName UNIQUE (columnName);"
Returns:
"ERROR: unique constraints are not supported on foreign tables"
On Fri, Apr 21, 2017 at 4:40 AM, Irina Mileva <imileva@transfermate.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/
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Many thanks!
Sent with AquaMail for Android
http://www.aqua-mail.com
On 21 април 2017 г. 19:15:58 Peter Geoghegan <pg@bowt.ie> wrote:
On Fri, Apr 21, 2017 at 4:40 AM, Irina Mileva <imileva@transfermate.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 GeogheganVMware vCenter Server
https://www.vmware.com/
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs