For some reason, I seam to feel as if the inserts that should be executed by 
a rule are not all getting executed, or at least, they are not getting writen.

How can I find out what the rule is really doing? The logs don't say much.

Any help will be grear at this moment of stress!!! X->

Saludos... :-)

-- 
Porquï¿½ usar una base de datos relacional cualquiera,
si podï¿½s usar PostgreSQL?
-----------------------------------------------------------------
Martï¿½n Marquï¿½s                  |        mmarques@unl.edu.ar
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------

Tue, 2 Oct 2001 20:28:07 -0300
=?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= <martin@bugs.unl.edu.ar>
Missing inserts

In 7.1.X and earlier the INSERT rules are executed _before_ the INSERT. 
This is changed to _after_ in 7.2.

> For some reason, I seam to feel as if the inserts that should be executed by 
> a rule are not all getting executed, or at least, they are not getting writen.
> 
> How can I find out what the rule is really doing? The logs don't say much.
> 
> Any help will be grear at this moment of stress!!! X->
> 
> Saludos... :-)
> 
> -- 
> Porqu? usar una base de datos relacional cualquiera,
> si pod?s usar PostgreSQL?
> -----------------------------------------------------------------
> Mart?n Marqu?s                  |        mmarques@unl.edu.ar
> Programador, Administrador, DBA |       Centro de Telematica
>                        Universidad Nacional
>                             del Litoral
> -----------------------------------------------------------------
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
> http://archives.postgresql.org
> 

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Tue, 2 Oct 2001 20:59:07 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Missing inserts
On Mar 02 Oct 2001 21:59, you wrote:
> In 7.1.X and earlier the INSERT rules are executed _before_ the INSERT.
> This is changed to _after_ in 7.2.

This would mean...??? I havenï¿½t had much trouble until now, so I canï¿½t 
understand why one of the 4 inserts of the rule didnï¿½t get through.

Is there some logic?

TIA!

-- 
Porquï¿½ usar una base de datos relacional cualquiera,
si podï¿½s usar PostgreSQL?
-----------------------------------------------------------------
Martï¿½n Marquï¿½s                  |        mmarques@unl.edu.ar
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------

Wed, 3 Oct 2001 16:43:26 -0300
=?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= <martin@bugs.unl.edu.ar>
Re: Missing inserts
On Miï¿½ 03 Oct 2001 16:43, you wrote:
> On Mar 02 Oct 2001 21:59, you wrote:
> > In 7.1.X and earlier the INSERT rules are executed _before_ the INSERT.
> > This is changed to _after_ in 7.2.
>
> This would mean...??? I havenï¿½t had much trouble until now, so I canï¿½t
> understand why one of the 4 inserts of the rule didnï¿½t get through.

Sorry for answering my own mail, but I found some info.

This is my rule:

CREATE RULE admin_insert AS ON 
INSERT TO admin_view
DO INSTEAD (
   INSERT INTO carrera 
	  (carrera,titulo,area,descripcion,incumbencia,director,
	  matricula,cupos,informes,nivel,requisitos,duracion,
	  categoria)
   VALUES 
	  (new.carrera,new.titulo,new.id_subarea,new.descripcion,
	  new.incumbencia,new.director,new.matricula,new.cupos,
	  new.informes,new.nivel,new.requisitos,new.duracion,
	  new.car_categ);

   INSERT INTO inscripcion
	  (carrera,fecha_ini,fecha_fin,lugar)
   VALUES
	  (currval('carrera_id_curso_seq'),new.fecha_ini,new.fecha_fin,
	  new.lugar);

   INSERT INTO resol
	  (carr,numero,year,fecha)
   VALUES
	  (currval('carrera_id_curso_seq'),new.numero,new.year,new.fecha);

   INSERT INTO log_carrera (accion,tabla,id_col) VALUES 
	  ('I','carrera',currval('carrera_id_curso_seq'));
);

All inserts to the tables are done to the view (so this rule is used), but I 
have 39 of a total of 142 inserts that didn't get the second insert of the 
rule to go.

The question is why is this happening, and how can I fix it?

If you need logs or something, I have no problem at all.

Saludos... :-)

-- 
Porquï¿½ usar una base de datos relacional cualquiera,
si podï¿½s usar PostgreSQL?
-----------------------------------------------------------------
Martï¿½n Marquï¿½s                  |        mmarques@unl.edu.ar
Programador, Administrador, DBA |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------

Wed, 3 Oct 2001 19:52:02 -0300
=?iso-8859-1?q?Mart=EDn=20Marqu=E9s?= <martin@bugs.unl.edu.ar>
Re: Missing inserts