deleting the master but not the detail

From: "Ismael (dot)(dot)(dot)(dot)" <ismaelpsp(at)hotmail(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: deleting the master but not the detail
Date: 2008-07-17 16:11:00
Message-ID: BLU103-W109AEF9B73C7C8336DC5C7A38E0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


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

But the delete command doesn't let me delete the master as long as
there are details referencing it.

ON DELETE RESTRICT | NO ACTION won't let me delete the master
CASCADE | SET NULL | SET DEFAULT will modify the details

Any idea ow to do it without the use of triggers?

SQL Server is got the option "ON DELETE DO NOTHING" or something
like that, that just oversees the deletion, but I didn't find it for postgres.
_________________________________________________________________
P.D. Checa las nuevas fotos de mi Space
http://home.services.spaces.live.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Decibel! 2008-07-17 16:19:36 Re: [HACKERS] postmaster.pid not visible
Previous Message mikesdenning 2008-07-17 16:08:45 autovacuum logging 8.1