new rule syntax?

From: "A(dot) R(dot) Van Hook" <hook(at)lake-lotawana(dot)mo(dot)us>
To: pgsql-sql(at)postgresql(dot)org
Subject: new rule syntax?
Date: 2006-02-05 12:00:18
Message-ID: 43E5E8D2.6020502@lake-lotawana.mo.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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?

--
Arthur R. Van Hook
Mayor
The City of Lake Lotawana

hook(at)lake-lotawana(dot)mo(dot)us

(816) 578-4704 - Home
(816) 578-4215 - City
(816) 564-0769 - Cell

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Milen A. Radev 2006-02-05 13:10:23 Re: new rule syntax?
Previous Message Tom Lane 2006-02-05 00:58:52 Re: UnixODBC-2.2.8-2.3.0 driver