Re: deleting the master but not the detail - Mailing list pgsql-general

From Scott Marlowe
Subject Re: deleting the master but not the detail
Date
Msg-id dcc563d10807171102i45ee2949o71296fdf33f408fc@mail.gmail.com
Whole thread Raw
In response to Re: deleting the master but not the detail  ("Douglas McNaught" <doug@mcnaught.org>)
Responses Re: deleting the master but not the detail
List pgsql-general
On Thu, Jul 17, 2008 at 10:52 AM, Douglas McNaught <doug@mcnaught.org> wrote:
> On Thu, Jul 17, 2008 at 12:11 PM, Ismael .... <ismaelpsp@hotmail.com> wrote:
>>
>> hi
>> I have one of those master-detail relationships here and I need to be able
>> to delete the master but leave the details untouched
>
> Then remove the referential integrity constraint, since it's obviously
> incompatible with your business requirements.

Generally I'd agree, but it might be useful to set the child record
referencing id field to NULL in this circumstance.

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Re: query optimization
Next
From: "Ismael ...."
Date:
Subject: Re: deleting the master but not the detail