X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 1D67E9DCBEB for ; Wed, 8 Feb 2006 13:33:33 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 96868-10 for ; Wed, 8 Feb 2006 13:33:32 -0400 (AST) X-Greylist: delayed 00:19:11.16196 by SQLgrey- Received: from outbound.internet-mail-service.net (outbound6.internet-mail-service.net [216.240.47.197]) by postgresql.org (Postfix) with ESMTP id ED5D49DCC65 for ; Wed, 8 Feb 2006 13:33:30 -0400 (AST) Received: from idiom.com (idiom.com [216.240.32.1]) by outbound.internet-mail-service.net (Postfix) with ESMTP id 8525424021C for ; Wed, 8 Feb 2006 09:33:30 -0800 (PST) Received: from [192.168.1.109] (adsl-69-107-112-198.dsl.pltn13.pacbell.net [69.107.112.198]) by idiom.com (8.12.11/8.12.11) with ESMTP id k18HXUTu032652 for ; Wed, 8 Feb 2006 09:33:30 -0800 (PST) (envelope-from bryce1@obviously.com) Message-ID: <43EA2B62.8070504@obviously.com> Date: Wed, 08 Feb 2006 09:33:22 -0800 From: Bryce Nesbitt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050921 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: Delete with join -- deleting related table entries? References: <43EA26E3.9040903@obviously.com> <1139419559.188208.72500@g43g2000cwa.googlegroups.com> In-Reply-To: <1139419559.188208.72500@g43g2000cwa.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.08 required=5 tests=[AWL=0.080] X-Spam-Score: 0.08 X-Spam-Level: X-Archive-Number: 200602/75 X-Sequence-Number: 24085 BigSmoke wrote: > ...I'd usually do this by using > issue_id INTEGER REFERENCES issue ON DELETE CASCADE > Good, and valuable, thanks! But at the moment I can't change the schema. So is there a way to do a cascaded or joined delete in a sql schema that did not anticipate it? Again, this is deleting rows from three related tables, as a single atomic operation. -Bryce