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 D02C19DCB51 for ; Wed, 8 Feb 2006 13:26:08 -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 95303-06 for ; Wed, 8 Feb 2006 13:26:07 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 6F4CB9DC821 for ; Wed, 8 Feb 2006 13:26:06 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id A4DE13093C; Wed, 8 Feb 2006 18:26:04 +0100 (MET) From: "BigSmoke" X-Newsgroups: pgsql.sql Subject: Re: Delete with join -- deleting related table entries? Date: 8 Feb 2006 09:25:59 -0800 Organization: http://groups.google.com Lines: 11 Message-ID: <1139419559.188208.72500@g43g2000cwa.googlegroups.com> References: <43EA26E3.9040903@obviously.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Complaints-To: groups-abuse@google.com User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g43g2000cwa.googlegroups.com; posting-host=212.204.130.113; posting-account=0WN9Mw0AAAChM4mno36wWr-RrABvnbDI To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200602/72 X-Sequence-Number: 24082 I'm not sure if this is true for you as I can't see your complete table definitions, but I'd usually do this by using issue_id INTEGER REFERENCES issue ON DELETE CASCADE in my column definition. See [1] for more information. [1]http://www.postgresql.org/docs/current/interactive/ddl-constraints.html#DDL-CONSTRAINTS-FK