Received: from nest.bistbn.com (postgres@nest.bistbn.com [209.88.174.52]) by hub.org (8.9.1/8.9.1) with ESMTP id DAA02891 for ; Tue, 15 Dec 1998 03:02:57 -0500 (EST) (envelope-from postgres@nest.bistbn.com) Received: from localhost (postgres@localhost) by nest.bistbn.com (8.9.1/8.9.1) with SMTP id KAA06134 for ; Tue, 15 Dec 1998 10:02:54 +0200 (IST) Date: Tue, 15 Dec 1998 10:02:54 +0200 (IST) From: Postgres DBA To: SQL Mailing List Subject: CREATE RULE question Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.