From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Martín Marqués <martin(at)bugs(dot)unl(dot)edu(dot)ar> |
Cc: | pgsql sql Mailing List <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: loop on a rule |
Date: | 2001-08-07 23:53:58 |
Message-ID: | 29386.997228438@sss.pgh.pa.us |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
=?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= <martin(at)bugs(dot)unl(dot)edu(dot)ar> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Martín Marqués | 2001-08-08 00:09:24 | Re: loop on a rule |
Previous Message | Martín Marqués | 2001-08-07 22:22:07 | loop on a rule |