Re: [PATCH] Support for foreign keys with arrays

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Support for foreign keys with arrays
Дата
Msg-id 2334.1321508694@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] Support for foreign keys with arrays  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-hackers
Josh Berkus <josh@agliodbs.com> writes:
>> BTW, has anyone thought through whether this is a sane idea at all?
>> It seems to me to be full of cases that will require rather arbitrary
>> decisions, like whether ON DELETE CASCADE should involve deleting the
>> whole row or just one array element.

> One array element, presumably.

Um, why?  One reasonable interpretation of an array reference is that
the row depends on *all* of the referenced pkeys.  Also, if you do
delete one array element at a time, what do you do when the array
becomes empty --- delete the row, or not, and in each case what's your
semantic justification for that choice?

In short, "presumably" doesn't cut it here.
        regards, tom lane


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

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: [PATCH] Support for foreign keys with arrays
Следующее
От: Hitoshi Harada
Дата:
Сообщение: Re: (PATCH) Adding CORRESPONDING to Set Operations