Re: new rule syntax? - Mailing list pgsql-sql

From Milen A. Radev
Subject Re: new rule syntax?
Date
Msg-id 43E5F93F.8000503@radev.net
Whole thread Raw
In response to new rule syntax?  ("A. R. Van Hook" <hook@lake-lotawana.mo.us>)
Responses Re: new rule syntax?  ("Jim Buttafuoco" <jim@contactbda.com>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: new rule syntax?
Next
From: "Jim Buttafuoco"
Date:
Subject: Re: new rule syntax?