Re: [PATCH] Support for Array ELEMENT Foreign Keys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Support for Array ELEMENT Foreign Keys
Дата
Msg-id 8780.1350679721@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] Support for Array ELEMENT Foreign Keys  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [PATCH] Support for Array ELEMENT Foreign Keys
Список pgsql-hackers
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



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Support for Array ELEMENT Foreign Keys
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: First draft of snapshot snapshot building design document