Re: [PATCH] Support for Array ELEMENT Foreign Keys

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [PATCH] Support for Array ELEMENT Foreign Keys
Дата
Msg-id 5081A566.7090002@dunslane.net
обсуждение исходный текст
Ответ на Re: [PATCH] Support for Array ELEMENT Foreign Keys  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] Support for Array ELEMENT Foreign Keys
Список 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





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: assertion failure w/extended query protocol
Следующее
От: Andres Freund
Дата:
Сообщение: Re: assertion failure w/extended query protocol