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 129099DC990 for ; Sun, 5 Feb 2006 12:20:10 -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 41490-01 for ; Sun, 5 Feb 2006 12:20:05 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from amanda.contactbda.com (ipn36372-f65123.cidr.lightship.net [216.204.66.227]) by postgresql.org (Postfix) with ESMTP id 5289F9DC941 for ; Sun, 5 Feb 2006 12:20:04 -0400 (AST) Received: from amanda.contactbda.com (amanda.contactbda.com [192.168.1.2]) by amanda.contactbda.com (8.12.11/8.12.11/Debian-3) with ESMTP id k15GK2S1005033; Sun, 5 Feb 2006 11:20:02 -0500 From: "Jim Buttafuoco" To: "Milen A. Radev" , pgsql-sql@postgresql.org Reply-To: jim@contactbda.com Subject: Re: new rule syntax? Date: Sun, 5 Feb 2006 11:20:02 -0500 Message-Id: <20060205161818.M41848@contactbda.com> In-Reply-To: <43E5F93F.8000503@radev.net> References: <43E5E8D2.6020502@lake-lotawana.mo.us> <43E5F93F.8000503@radev.net> X-Mailer: Open WebMail 2.41 20040926 X-OriginatingIP: 69.181.145.46 (jim) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.13 required=5 tests=[AWL=0.130] X-Spam-Score: 0.13 X-Spam-Level: X-Archive-Number: 200602/41 X-Sequence-Number: 24051 Try this rule instead create rule checks_d0 as on delete to checks do delete from checkitems where ckid = OLD.ckid; ---------- Original Message ----------- From: "Milen A. Radev" To: pgsql-sql@postgresql.org Sent: Sun, 05 Feb 2006 15:10:23 +0200 Subject: Re: [SQL] new rule syntax? [UTF-8?]> A. R. Van Hook написа: > > 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 > > create rule checks_d0 as > > on delete to checks > > do delete from checkitems > > where ckid = checks.ckid; > > in 8.1.2 I get > > > > ERROR: missing FROM-clause entry from table "checks" > > > > any idea? > > May be you are bitten by the change of the default value of > "add_missing_from" setting > (http://www.postgresql.org/docs/8.1/static/runtime-config-compatible.html#RUNTIME-CONFIG-COMPATIBLE-VERSION). > > -- > Milen A. Radev > > ---------------------------(end of broadcast)--------------------------- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly ------- End of Original Message -------