CREATE RULE new_rule2 AS ON DELETE TO public.klients_view
DO INSTEAD (
DELETE
FROM klients
WHERE (klients.klient_id = old.klient_id);
DELETE
FROM klient_services
WHERE (klient_services.klient_id = old.klient_id);
);
It's 2 commands, but executing only first. Why?
Stanislaw Tristan
Kyiv,
Stanislaw Tristan [EMAIL PROTECTED] writes:
It's 2 commands, but executing only first. Why?
You didn't show us the view, but I suppose it's an inner join of the two
tables? As soon as you delete the row from the first table, there's no
longer any matching row in the view, so the second command
On Thu, Oct 28, 2004 at 04:32:21AM +0300, Stanislaw Tristan wrote:
CREATE RULE new_rule2 AS ON DELETE TO public.klients_view
DO INSTEAD (
DELETE
FROM klients
WHERE (klients.klient_id = old.klient_id);
DELETE
FROM klient_services
WHERE (klient_services.klient_id = old.klient_id);
);