This is a discussion on Re: BUG #1533: "*OLD*" relation not recognized in CREATE RULE within the pgsql Bugs forums, part of the PostgreSQL category; --> "Henk van den Toorn" <vdtoorn@hotmail.com> writes: > CREATE RULE rulename AS ON UPDATE > table WHERE OLD.index = NEW.index ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| "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 ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org |