ON CONFLICT clause NOT working on Partition Table PostgreSQL 12

From: Inzamam Shafiq <inzamam(dot)shafiq(at)hotmail(dot)com>
To: "pgsql-sql(at)lists(dot)postgresql(dot)org" <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: ON CONFLICT clause NOT working on Partition Table PostgreSQL 12
Date: 2022-09-15 17:31:47
Message-ID: AM9P251MB033090199F1A3C2B1742A50A98499@AM9P251MB0330.EURP251.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hi Team,

I have a partitioned table in postgresql12 and the unique constraint is applied on the child tables, when I use ON CONFLICT clause it returned an error "duplicate key value violates unique constraint "..."", I tried to replicate the scenario on a test table and created a unique index on partition column and the unique column but when I try to insert data it again return the same error.

This works successfully when I directly insert data in the child table.

What could be the way forward to get this work on parent table?

Thanks.

Cheers,

Inzamam Shafiq
Sr. DBA

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Steve Midgley 2022-09-15 23:09:01 Re: ON CONFLICT clause NOT working on Partition Table PostgreSQL 12
Previous Message hubert depesz lubaczewski 2022-08-30 16:55:23 Re: execution id