RE: Problema con trigger

From: "Alejandro Loayza" <axle_vampire(at)msn(dot)com>
To: raulandresduque(at)hotmail(dot)com, pgsql-es-ayuda(at)postgresql(dot)org
Subject: RE: Problema con trigger
Date: 2007-01-30 05:59:51
Message-ID: BAY112-F25802C1970299EE329C4A3FEA60@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

<html><div style='background-color:'><DIV class=RTE>
<P>Que tal.</P>
<P>Bueno entiendo que un trigger se utiliza al finalizar o empezar un proceso SQL, si vas ha actualizar el campo en cada fila de la tabla pues deberas utilizar el mismo bucle de actualizacin general para actualizar el campo. Si quieres disparar laactualizacon del campo evaluando algo del proceso, bueno eso tambin esta en el bucle. Creo que no hay que sobreutilizar un trigger de forma innecesaria.</P>
<P>Alejandro.<BR><BR></P></DIV>
<DIV></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #a0c6e5 2px solid; MARGIN-RIGHT: 0px"><FONT style="FONT-SIZE: 11px; FONT-FAMILY: tahoma,sans-serif">
<HR color=#a0c6e5 SIZE=1>

<DIV></DIV>From:&nbsp;&nbsp;<I>Ral Andrs Duque &lt;raulandresduque(at)hotmail(dot)com&gt;</I><BR>To:&nbsp;&nbsp;<I>Felipe de Jess Molina Bravo &lt;felipe(dot)molina(at)inegi(dot)gob(dot)mx&gt;,&lt;pgsql-es-ayuda(at)postgresql(dot)org&gt;</I><BR>Subject:&nbsp;&nbsp;<I>[pgsql-es-ayuda] Problema con trigger</I><BR>Date:&nbsp;&nbsp;<I>Wed, 24 Jan 2007 22:50:10 -0500</I><BR>&gt;Que tal listeros:<BR>&gt;<BR>&gt;Intento crear un trigger que actualiza un campo (en la misma tabla) <BR>&gt;cuando se insertan o modifican datos ... el problema es que cuando <BR>&gt;se modifican datos se genera un "bucle" que llena el stack ... cada <BR>&gt;que se actualiza el campo vuelve a lanzarse el trigger y as <BR>&gt;sucesivamente ...<BR>&gt;<BR>&gt;Cmo puedo solucionarlo??<BR>&gt;sugerencias?<BR>&gt;<BR>&gt;se me ocurre que con un rule, podra hacerse algo desde un trigger?<BR>&gt;<BR>&gt;Atentamente,<BR>&gt;<BR>&gt;RAUL
DUQUE<BR>&gt;Bogot, Colombia<BR>&gt;<BR>&gt;<BR>&gt;---------------------------(fin del <BR>&gt;mensaje)---------------------------<BR>&gt;TIP 1: para suscribirte y desuscribirte, visita <BR>&gt;http://archives.postgresql.org/pgsql-es-ayuda<BR></FONT></BLOCKQUOTE></div><br clear=all><hr>Don't just search. Find. <a href="http://g.msn.com/8HMAEN/2746??PS=47575" target="_top">MSN Search</a> Check out the new MSN Search!</html>

Attachment Content-Type Size
unknown_filename text/html 2.0 KB

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Alejandro Loayza 2007-01-30 06:31:45 Re: iniciando desarrollo bd
Previous Message Alejandro Loayza 2007-01-30 05:42:42 Re: modelo cliente - servidor en postgresql