Re: Tigger after delete with plpgsql

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Tigger after delete with plpgsql
Date: 2012-08-31 18:38:37
Message-ID: 1649422.E3VxolOArD@skynet.simkin.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Grzegorz Tańczyk 2012-08-31 18:41:56 Re: Refreshing functional index
Previous Message David Johnston 2012-08-31 18:25:25 Re: Refreshing functional index