Re: RULE: ON DELETE doesn't stack deletes
| От | Stephan Szabo |
|---|---|
| Тема | Re: RULE: ON DELETE doesn't stack deletes |
| Дата | |
| Msg-id | 20021126083446.S77510-100000@megazone23.bigpanda.com обсуждение исходный текст |
| Ответ на | RULE: ON DELETE doesn't stack deletes (Malcolm Hutty <msah-postgres@hutty.com>) |
| Список | pgsql-bugs |
On Wed, 20 Nov 2002, Malcolm Hutty wrote: > According to the manual you can stack multiple queries in a RULE: > > CREATE RULE name AS ON event > TO object [ WHERE condition ] > DO [ INSTEAD ] action > > where action can be: > > NOTHING > | > query > | > ( query ; query ... ) > | > [ query ; query ... ] > > > This seems to work provided 'query' is not "DELETE"; if it is, only > the first one is executed. I think it's something like: delete from v_ab turns into something equivalent to the two statements (I don't know what the actual form of the queries is however) delete from a where a_data=ANY(select a_data from v_ab); delete from b where b_data=ANY(select b_data from v_ab); So when the second runs there is no matching rows (having already had all the a rows deleted).
В списке pgsql-bugs по дате отправления: