From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PATCH] Support for Array ELEMENT Foreign Keys |
Date: | 2012-10-19 20:48:41 |
Message-ID: | 8780.1350679721@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2012-10-19 20:53:06 | Re: First draft of snapshot snapshot building design document |
Previous Message | Tom Lane | 2012-10-19 20:40:43 | Re: [PATCH] Support for Array ELEMENT Foreign Keys |