Re: BUG #1533: "*OLD*" relation not recognized in CREATE RULE - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #1533: "*OLD*" relation not recognized in CREATE RULE
Date
Msg-id 5251.1110779596@sss.pgh.pa.us
Whole thread Raw
In response to BUG #1533: "*OLD*" relation not recognized in CREATE RULE  ("Henk van den Toorn" <vdtoorn@hotmail.com>)
List pgsql-bugs
"Henk van den Toorn" <vdtoorn@hotmail.com> writes:
> CREATE RULE rulename AS ON UPDATE
> table WHERE OLD.index = NEW.index
> DO INSTEAD NOTHING;

> Postgresql responds with

> ERROR: relation "*OLD*" does not exist

Hm, works for me:

regression=# create table tab1 (index serial primary key, data text);
NOTICE:  CREATE TABLE will create implicit sequence "tab1_index_seq" for "serial" column "tab1.index"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "tab1_pkey" for table "tab1"
CREATE TABLE
regression=# create rule r as on update to tab1 where old.index = new.index do instead nothing;
CREATE RULE
regression=# select version();
                            version
---------------------------------------------------------------
 PostgreSQL 7.4.7 on hppa-hp-hpux10.20, compiled by GCC 2.95.3
(1 row)

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1541: Unusually long INSERT times after fresh clean/CREATE TABLES
Next
From: Tom Lane
Date:
Subject: Re: BUG #1530: search on uuid indexed article returns no resultat