On Wed, May 9, 2018 at 10:20 PM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> But it seems I've misinterpreted what he was saying. He doesn't seem to
> be saying anything about how or whether we enforce the unique constraint
> on foreign tables. Only that if someone creates a constraint index on the
> partitioned table, all partitions *including* foreign partitions, must get
> a copy.
Honestly, I hadn't quite gotten that far in my thinking. That's a
really useful distinction, and I completely agree with it.
> So for now, we give users an error if they try to create an index on a
> partitioned table with a mix of local and foreign partitions. Once we
> figure out how to allow creating indexes (constraint-enforcing or not) on
> foreign tables, we can then think of relaxing that restriction.
Yeah, that sounds exactly right.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company