Gracias gente por tomarse el tiempo para responder , pero ya lo solucione,
el problema estaba
entre el teclado y la silla :(  :):):):)
salu2

jmdc


2012/11/7 Raul Andres Gutierrez Alejo <[email protected]>

> NEW es valido en  INSERT Y UPDATE
> OLD es valido en UPDATE Y DELETE
> con esta función puede probar los valores para cualquier tabla.
>
> CREATE OR REPLACE FUNCTION  tr_datos_d()
>   RETURNS trigger AS
> $BODY$
> DECLARE
>  BEGIN
>     IF TG_OP = 'INSERT' THEN
>         RAISE NOTICE 'INSERT NEW %',NEW;
>         RETURN NEW;
>     END IF;
>     IF TG_OP = 'UPDATE' THEN
>         RAISE NOTICE 'UPDATE NEW %',NEW;
>         RAISE NOTICE 'UPDATE OLD %',OLD;
>
>         RETURN  NEW;
>     END IF;
>     IF TG_OP = 'DELETE' THEN
>         RAISE NOTICE 'DELETE OLD %',OLD;
>         RETURN OLD;
>     END IF;
>
>  END;$BODY$
>   LANGUAGE plpgsql VOLATILE
>   COST 100;
>
> El 07/11/2012 04:14 p.m., Jaime Casanova escribió:
>
>> 2012/11/7 Juan <[email protected]**>:
>>
>>> Jaime
>>>
>>> Lo extraño es que para hacer el test yo use update
>>> por lo que entiendo update manda inicializado el New.
>>> lo raro es que ambos new y old estan en null.
>>> cualquier idea sera agradecida
>>>
>> y como determinas que NEW y OLD vienen en null?
>> te da algun error?
>>
>> --
>> Jaime Casanova         www.2ndQuadrant.com
>> Professional PostgreSQL: Soporte 24x7 y capacitación
>> Phone: +593 4 5107566         Cell: +593 987171157
>>
>> -
>> Enviado a la lista de correo pgsql-es-ayuda (
>> [email protected]**)
>> Para cambiar tu suscripción:
>> http://www.postgresql.org/**mailpref/pgsql-es-ayuda<http://www.postgresql.org/mailpref/pgsql-es-ayuda>
>>
>
>
> -
> Enviado a la lista de correo pgsql-es-ayuda ([email protected]
> **)
> Para cambiar tu suscripción:
> http://www.postgresql.org/**mailpref/pgsql-es-ayuda<http://www.postgresql.org/mailpref/pgsql-es-ayuda>
>

Responder a