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 D40579DC83F for ; Mon, 6 Feb 2006 05:50:09 -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 21990-02 for ; Mon, 6 Feb 2006 05:50:11 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 9D26E9DC835 for ; Mon, 6 Feb 2006 05:50:07 -0400 (AST) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 0A7B54149F6; Mon, 6 Feb 2006 09:49:28 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 6A91615EA4; Mon, 6 Feb 2006 09:49:20 +0000 (GMT) Message-ID: <43E71B9F.5090207@archonet.com> Date: Mon, 06 Feb 2006 09:49:19 +0000 From: Richard Huxton User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: "A. R. Van Hook" Cc: pgsql-sql@postgresql.org Subject: Re: new rule syntax? References: <43E5E8D2.6020502@lake-lotawana.mo.us> In-Reply-To: <43E5E8D2.6020502@lake-lotawana.mo.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.116 required=5 tests=[AWL=0.116] X-Spam-Score: 0.116 X-Spam-Level: X-Archive-Number: 200602/43 X-Sequence-Number: 24053 A. R. Van Hook wrote: > I have two tables defined as: > checks > (ckid int NOT null PRIMARY KEY, > payto text, > notes text, > ckdate date, > printed int default 0, > tdate timestamp not null) > checkitems > (item int not null, > ckid int NOT null references checks, > itemtype int not null, > amt numeric(7,3), > primary key (item, ckid)) > > in previous versions (<8.1) the following rule declaration seemed to > work fine Others have addresses your query with the rule. Can I ask why you're not using a DELETE CASCADE on the fkey? ... ckid int NOT null references checks ON DELETE CASCADE, ... -- Richard Huxton Archonet Ltd