[Pgsql-ayuda] Como implementar triggers con Pl/PgSQL.
Josue Maldonado
josue@lamundial.hn
Fri, 11 Jul 2003 17:52:19 -0600
This is a multi-part message in MIME format.
------=_NextPart_000_0026_01C347D5.2C423B10
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hola lista,
Disculpenme si mi inquietud parece muy simple o torpe. He revisado la =
ayuda de postgre y no he podido encontrar un ejemplo de como hacer con =
Pl/PgSql lo siguiente.
1. Un trigger que se ejecute cuando borro el registro de una tabla padre =
para que la integridad referencial pueda borrar los registros de la =
tabla hija.
2. Un trigger que inserte o actualize registros en otra tabla cuando se =
inserten o modifiquen registros en la tabla padre.
De antemano muchas gracias
Josu=E9 Maldonado.
------=_NextPart_000_0026_01C347D5.2C423B10
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hola lista,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Disculpenme si mi inquietud parece muy =
simple o=20
torpe. He revisado la ayuda de postgre y no he podido encontrar un =
ejemplo de=20
como hacer con Pl/PgSql lo siguiente.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>1. Un trigger que se ejecute cuando =
borro el=20
registro de una tabla padre para que la integridad referencial pueda =
borrar los=20
registros de la tabla hija.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>2. Un trigger que inserte o=20
actualize registros en otra tabla cuando se inserten o modifiquen =
registros=20
en la tabla padre.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>De antemano muchas gracias</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Josu=E9 =
Maldonado.</FONT></DIV></BODY></HTML>
------=_NextPart_000_0026_01C347D5.2C423B10--