Re: [PATCH] Support for Array ELEMENT Foreign Keys

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Support for Array ELEMENT Foreign Keys
Дата
Msg-id 9189.1350680898@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] Support for Array ELEMENT Foreign Keys  (Claudio Freire <klaussfreire@gmail.com>)
Список pgsql-hackers
Claudio Freire <klaussfreire@gmail.com> writes:
> What about something more generic?

> CREATE TABLE <tname> ( <cname> <type> [(<expr>)] REFERENCES <t2name>
> [(<t2expr>)] )

> Meaning, if <expr> is missing, it's taken <expr> = <cname>, if not,
> it's the result of that expression the one that references the target
> table.

Doesn't seem terribly sensible as a column constraint: a column
constraint ought to just be on the current column.  If you want
something more generic, the table-constraint syntax would be the
place for it ... but that's not where we have a syntax problem.
        regards, tom lane



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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Deprecating RULES
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Support for Array ELEMENT Foreign Keys