=?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= <[EMAIL PROTECTED]> writes:
> As I said before, I am playing around with views and rules, and found out 
> that I have something wrong in one of the rules. My delete rule says 
> something like this:

> CREATE RULE admin_delete AS ON
> DELETE TO admin_view
> DO INSTEAD (
>    DELETE FROM carrera WHERE id_curso=old.id_curso;
>    DELETE FROM inscripcion WHERE carrera=old.id_curso;
>    DELETE FROM resol WHERE carr=old.id_curso;
>    DELETE FROM modalidad WHERE carrera=old.id_curso;
>    INSERT INTO log_carrera (accion,tabla) VALUES ('D','carrera');
> );

I think you need the patch for multi-action rules --- see
http://www.ca.postgresql.org/cgi/cvsweb.cgi/pgsql/src/backend/rewrite/rewriteHandler.c
You need version 1.93.2.1, assuming that you're on PG 7.1.2.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to