Hi!
Is there any way to create rule with more than one action?
The syntax shown in psql help as well as appropriate man page
definitely show that it's possible:
CREATE RULE rule_name AS ON
[SELECT|UPDATE|DELETE|INSERT]
TO object [WHERE qual]
DO [INSTEAD] [action|NOTHING|[actions]];
but I can't do anything about it:
CREATE RULE proba_upd
AS ON update to proba
DO UPDATE proba SET dr_date = 'now'::text where id=OLD.id and
dr_date='infinity'
INSERT INTO proba VALUES (NEW.id, NEW.name)
;
ERROR: parser: parse error at or near "insert"
So, is that my fault, and I should place something between to queries or
that is just impossible?
Thanks in advance.
Aleksey.