BUG #14351: Upsert not working in case of partitioned tables

From: ing(dot)marco(dot)colombo(at)gmail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14351: Upsert not working in case of partitioned tables
Date: 2016-10-03 14:21:00
Message-ID: 20161003142100.27241.67538@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14351
Logged by: Marco Colombo
Email address: ing(dot)marco(dot)colombo(at)gmail(dot)com
PostgreSQL version: 9.5.4
Operating system: CentOS 7.2
Description:

Hi, I'm trying to use a upsert query on a partitioned table. While same
query/data import works from a standard table, this does not work in case
table is partioned. I see no mention anywhere that a partitioned table does
not support upsert queries.
Error is:

ERROR: duplicate key value violates unique constraint
"dh_1_p_20160904_pkey"
DETAIL: Key (id, ts, did, pid)=(2742, 2016-09-01 17:00:00, 1, 0) already
exists.
CONTEXT: SQL statement "insert into partitions.dh_1_p_20160904 values
(new.*)"
PL/pgSQL function dh_1_trg_ins() line 12 at SQL statement

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Fetter 2016-10-03 20:08:26 Re: BUG #14351: Upsert not working in case of partitioned tables
Previous Message maxim.boguk 2016-10-03 11:53:22 BUG #14350: VIEW with INSTEAD OF INSERT TRIGGER and COPY. Missing feature or working as designed.