X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CB403D87CA for ; Sat, 10 Sep 2005 13:22:57 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 45646-02 for ; Sat, 10 Sep 2005 16:22:53 +0000 (GMT) Received: from eastrmmtao01.cox.net (eastrmmtao01.cox.net [68.230.240.38]) by svr1.postgresql.org (Postfix) with ESMTP id CD835D7ECE for ; Sat, 10 Sep 2005 13:22:51 -0300 (ADT) Received: from [192.168.0.17] (really [24.250.197.37]) by eastrmmtao01.cox.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20050910162251.IKGZ9903.eastrmmtao01.cox.net@[192.168.0.17]>; Sat, 10 Sep 2005 12:22:51 -0400 From: Robert Treat To: pgsql-admin@postgresql.org Subject: Re: Stupid question about triggers Date: Sat, 10 Sep 2005 12:22:49 -0400 User-Agent: KMail/1.6.2 Cc: Mauri Sahlberg References: <43218C15.1070704@claymountain.com> In-Reply-To: <43218C15.1070704@claymountain.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200509101222.50119.xzilla@users.sourceforge.net> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 required=5 tests=[AWL=0.008] X-Spam-Level: X-Archive-Number: 200509/102 X-Sequence-Number: 18839 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) > 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