Re: rules
От | Joel Burton |
---|---|
Тема | Re: rules |
Дата | |
Msg-id | Pine.LNX.4.21.0104261652140.3977-100000@olympus.scw.org обсуждение исходный текст |
Ответ на | rules (Martín Marqués <martin@bugs.unl.edu.ar>) |
Список | pgsql-sql |
On Thu, 26 Apr 2001, [iso-8859-1] Mart�n Marqu�s wrote: > Is it posible to make a rule execute more then one query? > > Something like: > > CREATE RULE rule_name AS ON INSERT TO table1 > DO INSTEAD > INSERT INTO table2 VALUES > (new.value1,new.value2) > INSERT INTO table3 VALUES > (x,y) test=# \h create rule Command: CREATE RULE Description: Defines a new rule Syntax: CREATE RULE name AS ON event TO object [ WHERE condition ] DO [ INSTEAD ] action where action can be: NOTHING | query | ( query ; query ... ) | [ query ; query ... ] ie CREATE RULE snog AS ON UPDATE TO foo DO INSTEAD ( ...; ... ); -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington
В списке pgsql-sql по дате отправления: