Re: [PATCH] Support for foreign keys with arrays - Mailing list pgsql-hackers

From Jaime Casanova
Subject Re: [PATCH] Support for foreign keys with arrays
Date
Msg-id CAJKUy5g=9+yXqj_HtS0017apk2XYjyfVxDiq5-wdmk-MgQuuOQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Support for foreign keys with arrays  (Noah Misch <noah@leadboat.com>)
List 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 by date:

Previous
From: Josh Berkus
Date:
Subject: Re: [PATCH] Support for foreign keys with arrays
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Support for foreign keys with arrays