CREATE RULE question - Mailing list pgsql-sql

From Postgres DBA
Subject CREATE RULE question
Date
Msg-id Pine.BSF.4.02.9812151002260.6120-100000@nest.bistbn.com
Whole thread Raw
Responses Re: [SQL] CREATE RULE question
List pgsql-sql
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.



pgsql-sql by date:

Previous
From: KOUL Christian
Date:
Subject: command copy and type char(x)
Next
From: Zsolt Varga
Date:
Subject: Unix dateformat ?