Re: Tigger after delete with plpgsql - Mailing list pgsql-general

From Alan Hodgson
Subject Re: Tigger after delete with plpgsql
Date
Msg-id 1649422.E3VxolOArD@skynet.simkin.ca
Whole thread Raw
In response to Re: Tigger after delete with plpgsql  (Fellipe Henrique <fellipeh@gmail.com>)
Responses Re: Tigger after delete with plpgsql
List pgsql-general
On Friday, August 31, 2012 03:14:15 PM Fellipe Henrique wrote:
> CREATE TRIGGER nfentrada_item_tr1
>   BEFORE DELETE
>   ON public.nfentrada_item FOR EACH ROW
>   EXECUTE PROCEDURE public.nfentrada_item_ad0();
>
> here is my nfentrada_item_ad0();
>
>     delete
>       from MOVIMENTO
>       where (IDEMPRESA = OLD.idempresa) and
>             (upper(TABELA) = 'NFENTRADA_ITEM') and
>             (CODIGO = OLD.idnfentrada_item);
>       return old;
>
> I just want to delete all row in my MOVIMENTO table with these
> conditionals..
>

And the error appears when you do a DELETE FROM public.nfentrada_item? Can you
post the entire function declaration with the CREATE comand?



pgsql-general by date:

Previous
From: "David Johnston"
Date:
Subject: Re: Refreshing functional index
Next
From: Grzegorz Tańczyk
Date:
Subject: Re: Refreshing functional index