Unix Technical Forum

Re: BUG #1533: "*OLD*" relation not recognized in CREATE RULE

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 ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 08:39 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #1533: "*OLD*" relation not recognized in CREATE RULE

"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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:33 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com