Re: pgsql: Foreign keys on partitioned tables

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgsql: Foreign keys on partitioned tables
Date: 2018-04-06 14:13:12
Message-ID: CA+TgmobWi8SK4Y00fihq-SgpGDohkiuFxFsVwOi-O1o5EdDmBQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Apr 4, 2018 at 1:03 PM, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> Foreign keys on partitioned tables
>
> Author: Álvaro Herrera
> Discussion: https://postgr.es/m/20171231194359.cvojcour423ulha4@alvherre.pgsql
> Reviewed-by: Peter Eisentraut

The commit message here was so brief that I had to read the
documentation to figure out exactly what this feature was. In so
doing, I ran across this, which seems to need some cleanup:

+ Also, while it's possible to define <literal>PRIMARY KEY</literal>
+ constraints on partitioned tables, it is not supported to create foreign
+ keys cannot that reference them. This restriction will be lifted in a
+ future release.

Generally, I think we're better off not committing to doing things in
a future release because we never really know what will happen in the
future, but the biggest problem here is that "it is not supported to
create foreign keys cannot that reference them" doesn't make any
sense. I think you mean something like "creating foreign keys that
reference a partitioned table is not supported".

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2018-04-06 15:39:50 pgsql: Refactor PgFdwModifyState creation/destruction into separate fun
Previous Message Peter Eisentraut 2018-04-06 14:03:50 pgsql: Split the SetSubscriptionRelState function into two

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-04-06 14:14:52 Re: WIP: a way forward on bootstrap data
Previous Message Tom Lane 2018-04-06 14:04:34 Re: ERROR: invalid memory alloc request size 1073741824