CREATE RULE question
От | Postgres DBA |
---|---|
Тема | CREATE RULE question |
Дата | |
Msg-id | Pine.BSF.4.02.9812151002260.6120-100000@nest.bistbn.com обсуждение исходный текст |
Ответы |
Re: [SQL] CREATE RULE question
|
Список | 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 по дате отправления: