view rules
От | Oleg Lebedev |
---|---|
Тема | view rules |
Дата | |
Msg-id | 3C0FD268.DFFA9CB8@waterford.org обсуждение исходный текст |
Ответы |
Re: view rules
|
Список | pgsql-sql |
Hi everybody, I am trying to create an update rule for a view. It's created fine, and I can find it in pg_rules, but when I try to update the view, I get the usual error: ERROR: Cannot update a view without an appropriate rule. My rule definitions is as follows: CREATE RULE update_priority AS ON UPDATE TO progress_report WHERE NEW.priority != OLD.priority DO INSTEAD UPDATE activity SET priority=NEW.priority WHERE activity.productcode = OLD.product_code AND activity.actname=OLD.component; I am trying to update the view as follows: update progress_report set priority=2 where product_code='m3' and component='act'; activity is a table. I can't figure out what's wrong. Please help. thanks, Oleg
В списке pgsql-sql по дате отправления: