Received: from tobago.pathwaynet.com (tobago.pathwaynet.com [216.46.203.46]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA03692 for ; Thu, 22 Jul 1999 10:36:01 -0400 (EDT) (envelope-from peter@pathwaynet.com) Received: from [216.46.200.98] (helo=saxony.pathwaynet.com) by tobago.pathwaynet.com with esmtp (Exim 3.00 #1) id 117Jx1-0000YY-00 for pgsql-sql@postgresql.org; Thu, 22 Jul 1999 10:35:59 -0400 Date: Thu, 22 Jul 1999 10:35:59 -0400 (EDT) From: Peter Eisentraut To: pgsql-sql@postgresql.org Subject: Problem with Rules Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I am trying to create some rules for referential integrity. A generic example: test=> create table one (id int4, name text); test=> create table two (ref int4, descr text); So lets say the "ref" references the "id" and I want to ensure update and delete cascade when table "one" is modified: test=> create rule one_delete_cascade as on delete to one do delete from two where ref = current.id; ERROR: current: Table does not exist. test=> create rule one_update_cascade as on update to one do update two set ref=new.id where ref=current.id; ERROR: current: Table does not exist. Apparently, it recognizes the "new" pseudo-instance but not the "current" one. Please don't tell me "current" is not yet implemented. test=> select version(); version -------------------------------------------------------------- PostgreSQL 6.5.0 on i686-pc-linux-gnu, compiled by gcc 2.7.2.3 Thanks. -- Peter Eisentraut PathWay Computing, Inc.