Re: [PATCH] Support for foreign keys with arrays - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Support for foreign keys with arrays
Date
Msg-id 12609.1332442965@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Support for foreign keys with arrays  (Marco Nenciarini <marco.nenciarini@2ndQuadrant.it>)
Responses Re: [PATCH] Support for foreign keys with arrays  (Gianni Ciolli <gianni.ciolli@2ndquadrant.it>)
Re: [PATCH] Support for foreign keys with arrays  (Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>)
List pgsql-hackers
Marco Nenciarini <marco.nenciarini@2ndQuadrant.it> writes:
> Attached is v5, which should address all the remaining issues.

I started to look at this patch a bit.  I'm quite confused by the fact
that some, but not all, of the possible FK action types now come in an
EACH variant.  This makes no sense at all to me.  ISTM that EACH is a
property of the FK constraint as a whole, that is that it says the
constraint is from array elements on the referencing side to column
values on the referenced side, rather than the normal case of column
values to column values.  Why would the possible actions be affected,
and why only these?  The patch documentation is extremely unclear about
this.  It's even less clear about what the semantics are in multi-key
cases.  Right offhand I would say that multi-key cases are nonsensical
and should be forbidden outright, because there is no way to figure out
which collections of elements of different arrays should be considered
to be a referencing item.

Could we see a specification of what the referencing semantics are
intended to be, please?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)
Next
From: Tom Lane
Date:
Subject: Re: Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)