Search Postgresql Archives

Re: Tigger after delete with plpgsql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux