From: Noah Misch <noah@leadboat.com>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: Marco Nenciarini <marco.nenciarini@2ndquadrant.it>
Cc: Gabriele Bartolini <gabriele.bartolini@2ndquadrant.it>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] Support for foreign keys with arrays
Date: Sun, 22 Jan 2012 21:30:45 -0500
Message-ID: <20120123023045.GD15693@tornado.leadboat.com> (raw)
In-Reply-To: <CA+U5nML-xQYigwy3zPybs=+CNeOtwo-1LZ15D28oF19Hccr1Cg@mail.gmail.com>
References: <4EB3DF02.4020604@2ndQuadrant.it>
<20111117042841.GA20517@tornado.leadboat.com>
<4EC8CA0F.8040405@2ndQuadrant.it>
<20111120130526.GD12013@tornado.leadboat.com>
<4EE31CB9.90005@2ndQuadrant.it>
<20111212004506.GB10399@tornado.leadboat.com>
<1326568728.2613.16.camel@greygoo.devise-it.lan>
<20120121204223.GA2388@tornado.leadboat.com>
<CA+U5nML-xQYigwy3zPybs=+CNeOtwo-1LZ15D28oF19Hccr1Cg@mail.gmail.com>
On Sun, Jan 22, 2012 at 09:06:49PM +0000, Simon Riggs wrote:
> On Sat, Jan 21, 2012 at 8:42 PM, Noah Misch <noah@leadboat.com> wrote:
>
> > You currently forbid multi-column EACH FKs. ?I agree that we should allow only
> > one array column per FK; with more, the set of required PK rows would be
> > something like the Cartesian product of the elements of array columns.
> > However, there are no definitional problems, at least for NO ACTION, around a
> > FK constraint having one array column and N scalar columns. ?Whether or not
> > you implement that now, let's choose a table_constraint syntax leaving that
> > opportunity open. ?How about:
> > ? ? ? ?FOREIGN KEY(col_a, EACH col_b, col_c) REFERENCES pktable (a, b, c)
>
>
> I don't think we should be trying to cover every possible combination
> of arrays, non-arrays and all the various options. The number of
> combinations is making this patch larger than it needs to be and as a
> result endangers its being committed in this release just on committer
> time to cope with the complexity. We have a matter of weeks to get
> this rock solid.
>
> Yes, lets keep syntax open for future additions, but lets please
> focus/edit this down to a solid, useful patch for 9.2.
+1. Let's change the syntax to leave that door open but not use the
flexibility at this time.
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: noah@leadboat.com, simon@2ndQuadrant.com, marco.nenciarini@2ndquadrant.it, gabriele.bartolini@2ndquadrant.it
Subject: Re: [PATCH] Support for foreign keys with arrays
In-Reply-To: <20120123023045.GD15693@tornado.leadboat.com>
* 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