Re: Missing inserts
От | Martín Marqués |
---|---|
Тема | Re: Missing inserts |
Дата | |
Msg-id | 20011003225204.A7EFC2AB45@bugs.unl.edu.ar обсуждение исходный текст |
Ответ на | Re: Missing inserts (Martín Marqués <martin@bugs.unl.edu.ar>) |
Список | pgsql-hackers |
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 -----------------------------------------------------------------
В списке pgsql-hackers по дате отправления: