Re: Stupid question about triggers

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Cc: Mauri Sahlberg <Mauri(dot)Sahlberg(at)claymountain(dot)com>
Subject: Re: Stupid question about triggers
Date: 2005-09-10 16:22:49
Message-ID: 200509101222.50119.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Greg Sabino Mullane 2005-09-10 20:15:50 Re: Disabling WAL for bulk data loads
Previous Message Andrei Verovski (aka MacGuru) 2005-09-10 09:47:59 Getting list of Indexes & contrains