Partitioning vs ON CONFLICT

Thom Brown <thom@linux.com>

From: Thom Brown <thom@linux.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>, Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Date: 2017-02-16T14:54:00Z
Lists: pgsql-hackers
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?

Thanks

Thom


Commits

  1. Revert "Allow ON CONFLICT .. DO NOTHING on a partitioned table."

  2. Allow ON CONFLICT .. DO NOTHING on a partitioned table.