X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id DC9AA9FB2FD for ; Mon, 21 Aug 2006 09:20:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 20396-07-2 for ; Mon, 21 Aug 2006 09:20:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from danbo.digsys.bg (danbo.digsys.bg [192.92.129.13]) by postgresql.org (Postfix) with ESMTP id 059B89FB1C8 for ; Mon, 21 Aug 2006 09:19:14 -0300 (ADT) Received: from [193.68.6.22] (kaloyan@luke.digsys.bg [193.68.6.22]) by danbo.digsys.bg (8.11.6/8.10.1) with ESMTP id k7LCJ9800229; Mon, 21 Aug 2006 15:19:10 +0300 (EEST) Message-ID: <44E9A4BC.2040309@faith.digsys.bg> Date: Mon, 21 Aug 2006 15:19:08 +0300 From: Kaloyan Iliev User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060117 X-Accept-Language: bg, en, en-us MIME-Version: 1.0 To: Ezequias Rodrigues da Rocha , pgsql-sql@postgresql.org Subject: Re: Triggers References: <55c095e90608210503h530a53b6rc49113e379e3d466@mail.gmail.com> In-Reply-To: <55c095e90608210503h530a53b6rc49113e379e3d466@mail.gmail.com> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.054 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/150 X-Sequence-Number: 26108 Hi, You can use one procedure(function in Postgres) but you have to use 26 triggers. Every trigger can call this one procedure to record the information you want. Regards, Kaloyan Iliev Ezequias Rodrigues da Rocha wrote: > Hi list, > > I am planning to generate a trigger to each [update or delete or > insert] on my database to register all moviment on my base > (current_user, when, action, user). > > I notice that the trigger is able put a procedure in action but as I > have more than 20 tables I would like to use only one trigger to solve > my problem. Is that possible ? > > Now my trigger is working well but I do not want to make 26 triggers > and 26 functions. > > Is there any people that can help me with this question ? > > > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > Atenciosamente (Sincerely) > Ezequias Rodrigues da Rocha > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > A pior das democracias ainda é melhor do que a melhor das ditaduras > The worst of democracies is still better than the better of dictatorships > http://ezequiasrocha.blogspot.com/