pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pgsql: Allow UNIQUE indexes on partitioned tables
Date: Mon, 12 Mar 2018 13:34:15 -0300
Message-ID: <20180312163415.6s3enkeetf5cbkot@alvherre.pgsql> (raw)
In-Reply-To: <CAKFQuwZ1hjrNt6AKT88xcObzoZN6gasE4gmXOtduQAwN-HY-HA@mail.gmail.com>

David G. Johnston wrote:

> Something like:
> 
> When establishing a unique constraint for a multi-level partition hierarchy
> all the "partition by" columns of the target partitioned table, as well as
> those of all its descendant partitioned tables, must be included in the
> constraint definition.

Yeah, that seems better to me.  Pushed.

> If I understand the above then the following failing test would be a worthy
> addition to memorialize the behavior of ALTER TABLE ATTACH under this
> constraint.
> 
> create table idxpart (a int primary key, b int) partition by range (a);
> create table idxpart1 (a int not null, b int, primary key (a, b)) partition
> by range (a, b);
> alter table idxpart attach partition idxpart1 for values from (1) to (1000);

Included this one too.


Thanks for reading!

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (9+ messages)  latest in thread

Message-ID: <20180312163415.6s3enkeetf5cbkot@alvherre.pgsql>
Permalink:  ../20180312163415.6s3enkeetf5cbkot@alvherre.pgsql/
Also on:    postgresql.org/message-id/20180312163415.6s3enkeetf5cbkot@alvherre.pgsql

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, david.g.johnston@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Allow UNIQUE indexes on partitioned tables
  In-Reply-To: <20180312163415.6s3enkeetf5cbkot@alvherre.pgsql>
  References: <CAKFQuwZ1hjrNt6AKT88xcObzoZN6gasE4gmXOtduQAwN-HY-HA@mail.gmail.com> <20180312163415.6s3enkeetf5cbkot@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