From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: unique indexes on partitioned tables
Date: Mon, 22 Jan 2018 19:55:40 -0300
Message-ID: <20180122225540.javvbv6f53obw74n@alvherre.pgsql> (raw)
In-Reply-To: <20180111210412.5k4xt3wkztazd67u@alvherre.pgsql>
Version 4 of this patch, rebased on today's master.
The main change is in dependency handling for the constraints: you now
can't drop a constraint from a partition, if it's attached to a
constraint in the parent (you can't drop indexes from under the
constraints either, but that was true in previous versions too). Also
some error message rewording. I added a bunch of additional tests.
I implemented the dependencies using pg_depend entries. However,
pg_constraint has the notion of "coninhcount" and "conislocal", so I
update those values for the partition's pg_constraint row, because the
error messages are nicer that way. We could remove those lines from the
patch and the mechanics should be pretty much identical.
I'll review the doc additions, per Simon upthread.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org
Subject: Re: unique indexes on partitioned tables
In-Reply-To: <20180122225540.javvbv6f53obw74n@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox