Robert Haas <robertmhaas@gmail.com> writes:
> This is a little sneaky, but I presume you only get the grammar
> conflict if you try to sneak the "each" or "element" or "each element"
> or whatever-you-call-it designator in BEFORE the column name. So what
> about just putting it afterwards? Something like this:
> FOREIGN KEY (a, b BY ELEMENT) REFERENCES ...
That's not the syntax we're having problems with, it's the column
constraint syntax; that is
CREATE TABLE t1 (c int[] REFERENCES t2);
It looks like we could support
CREATE TABLE t1 (c int[] REFERENCES BY ELEMENT t2);
but (1) this doesn't seem terribly intelligible to me, and
(2) I don't see how we modify that if we want to provide
at-least-one-match semantics later.
regards, tom lane