Rule not invoked in 7.1 - Mailing list pgsql-sql

From Kyle
Subject Rule not invoked in 7.1
Date
Msg-id 3A6F53C8.CA9FE05C@actarg.com
Whole thread Raw
Responses Re: Rule not invoked in 7.1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
I have a number of views that seemed to work fine in 7.0.3.  When I try to do an update to these views under 7.1, I get the following error:

ERROR:  Cannot update a view without an appropriate rule.

For example, there's a view that looks like this:

create view pay_req_v_prl as select empl_id,wdate,seq,hours,hot,proj,entby,paytyp,status,poinum,added,rate,otrate,appby,gross,rgross,cost,ttype,expnum,oid as _oid from pay_req

create rule pay_req_v_prl_update as on update to pay_req_v_prl
    where old.status = 'appr' do instead
    update pay_req set status = new.status, gross = new.gross, cost = new.cost,
    ttype = new.ttype, expnum = new.expnum, rgross = new.rgross, hot = new.hot
    where empl_id = old.empl_id and wdate = old.wdate and seq = old.seq;

The sql looks like this:

update pay_req_v_prl set gross = 90.09 where empl_id = 1010 and wdate = '2001-01-08' and seq = 1;

The record it should update does seem to have status = 'appr' and it updates fine on my 7.0.3 box.

Any ideas?

Attachment

pgsql-sql by date:

Previous
From: Forest Wilkinson
Date:
Subject: Re: unreferenced primary keys: garbage collection
Next
From: clayton cottingham
Date:
Subject: Veering OT opinions please XQL versus XML-QL