Re: deleting the master but not the detail

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: "Ismael (dot)(dot)(dot)(dot)" <ismaelpsp(at)hotmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: deleting the master but not the detail
Date: 2008-07-17 18:58:03
Message-ID: 20080717103731.T77268@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 17 Jul 2008, Ismael .... wrote:

> So is there no other way to do it but to verify the integrity using triggers
> and drop the referential constraints?

Well, you could do something using a before delete trigger on the
referencing table that returns NULL to avoid the delete as well, but
making it only prevent the deletions caused by the referential constraints
might be difficult.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Douglas McNaught 2008-07-17 19:21:43 Re: [HACKERS] postmaster.pid not visible
Previous Message Rhys A.D. Stewart 2008-07-17 18:53:41 in query variables....