Re: deleting the master but not the detail

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "Douglas McNaught" <doug(at)mcnaught(dot)org>
Cc: "Ismael (dot)(dot)(dot)(dot)" <ismaelpsp(at)hotmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: deleting the master but not the detail
Date: 2008-07-17 18:02:29
Message-ID: dcc563d10807171102i45ee2949o71296fdf33f408fc@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jul 17, 2008 at 10:52 AM, Douglas McNaught <doug(at)mcnaught(dot)org> wrote:
> On Thu, Jul 17, 2008 at 12:11 PM, Ismael .... <ismaelpsp(at)hotmail(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ismael .... 2008-07-17 18:22:13 Re: deleting the master but not the detail
Previous Message Scott Marlowe 2008-07-17 18:00:12 Re: query optimization