From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 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 19:09:26 |
Message-ID: | 5081A566.7090002@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10/18/2012 10:26 PM, Tom Lane wrote:
> Another possibility is to forget about the column constraint ELEMENT
> REFERENCES syntax, and only support the table-constraint syntax with
> ELEMENT inside the column list --- I've not checked, but I think that
> syntax doesn't have any ambiguity problems.
>
> Or we could go back to using ARRAY here --- that should be safe since
> ARRAY is already fully reserved.
>
> Or we could choose some other syntax. I'm wondering about dropping the
> use of a keyword entirely, and instead using '[]' decoration. This
> wouldn't work too badly in the table constraint case:
>
> FOREIGN KEY (foo, bar[]) REFERENCES t (x,y)
>
> but I'm less sure where to put the decoration for the column constraint
> case.
>
> Thoughts?
>
>
I'm late to this party, so I apologize in advance if this has already
been considered, but do we actually need a special syntax? Can't we just
infer that we have one of these when the referring column is an array
and the referenced column is of the base type of the array?
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2012-10-19 19:24:25 | Re: assertion failure w/extended query protocol |
Previous Message | Tom Lane | 2012-10-19 19:05:30 | Re: assertion failure w/extended query protocol |