Re: [PATCH] Support for foreign keys with arrays

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: [PATCH] Support for foreign keys with arrays
Дата
Msg-id CAJKUy5g=9+yXqj_HtS0017apk2XYjyfVxDiq5-wdmk-MgQuuOQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Support for foreign keys with arrays  (Noah Misch <noah@leadboat.com>)
Список pgsql-hackers
On Wed, Nov 16, 2011 at 11:28 PM, Noah Misch <noah@leadboat.com> wrote:
>
> Removing values from the array seems best to me.  There's no doubt about what
> ON UPDATE CASCADE should do, and having ON DELETE CASCADE excise individual
> array elements is consistent with that.  It's less clear for SET NULL, but I'd
> continue with a per-element treatment.  I'd continue to forbid SET DEFAULT.
>
> However, Jeff Davis did expect ON DELETE CASCADE to remove entire rows:
> http://archives.postgresql.org/message-id/1288119207.15279.24.camel@jdavis-ux.asterdata.local
> So, perhaps the behavior needs to be user-selectable.
>

i will agree with Jeff on this...

i mean, on the normal case it will delete the row. no?

the docs says about the CASCADE action
"""
CASCADE
Delete any rows referencing the deleted row, or update the value of
the referencing column to the new value of the referenced column,
respectively.
"""

so, that is what i will expect

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: [PATCH] Support for foreign keys with arrays
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Support for foreign keys with arrays