Re: [PATCH] Support for foreign keys with arrays

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marco Nenciarini <marco(dot)nenciarini(at)2ndQuadrant(dot)it>
Cc: pgsql-hackers(at)postgresql(dot)org, Noah Misch <noah(at)leadboat(dot)com>
Subject: Re: [PATCH] Support for foreign keys with arrays
Date: 2012-03-22 19:02:45
Message-ID: 12609.1332442965@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marco Nenciarini <marco(dot)nenciarini(at)2ndQuadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-03-22 19:07:55 Re: Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)
Previous Message Peter Geoghegan 2012-03-22 18:49:33 Re: Re: pg_stat_statements normalisation without invasive changes to the parser (was: Next steps on pg_stat_statements normalisation)