Re: Stupid question about triggers - Mailing list pgsql-admin

From Robert Treat
Subject Re: Stupid question about triggers
Date
Msg-id 200509101222.50119.xzilla@users.sourceforge.net
Whole thread Raw
In response to Stupid question about triggers  (Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>)
Responses Re: Stupid question about triggers  (Mauri Sahlberg <Mauri.Sahlberg@claymountain.com>)
List pgsql-admin
On Friday 09 September 2005 09:20, Mauri Sahlberg wrote:
> Hi,
>
> I have found myself in a situation where I need to quickly delete rows
> from a production database. Unfortunately table for the rows to be
> deleted have triggers which results massive chain of update operations
> on other tables. I do not wish those to happen as I'm about to delete
> concerned rows from the other tables as well. (7.4.7)
>
<snip>

Your proposed syntax looks about correct, though I'd suggest trying on a test
system first if possible.  I would caution though that this type of hacking
about is going to break any referential integrity your database once had with
this data.

If you really are going to be deleting data that has a bunch of related data
in other tables, istm that that should be handled by some foriegn keys, so
I'm a bit suspicious of your db schema based on this email.  Just my .02.

--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

pgsql-admin by date:

Previous
From: tgoodair@ca.afilias.info (Tim Goodaire)
Date:
Subject: Re: Disabling WAL for bulk data loads
Next
From: "Greg Sabino Mullane"
Date:
Subject: Re: Disabling WAL for bulk data loads