Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 757662E3352 for ; Tue, 15 Jan 2008 17:27:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 60251-03 for ; Tue, 15 Jan 2008 17:27:16 -0400 (AST) Received: from mail.fmed.uba.ar (mail.fmed.uba.ar [157.92.152.1]) by postgresql.org (Postfix) with ESMTP id BCE372E3343 for ; Tue, 15 Jan 2008 17:27:18 -0400 (AST) Received: from [157.92.155.58] (mailbis [157.92.155.58]) by mail.fmed.uba.ar (Postfix) with ESMTP id 6642D11D0DA for ; Tue, 15 Jan 2008 19:27:27 -0200 (ARST) Message-ID: <478D25B7.8030308@fmed.uba.ar> Date: Tue, 15 Jan 2008 18:29:27 -0300 From: Gerardo Herzig User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "pgsql-sql@postgresql.org" Subject: obtaining the query string inside a trigger Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/137 X-Sequence-Number: 29990 Hi all. Im working on a "on each statement" update trigger, so NEW and OLD are NULL. Suppose a simple query like 'update mytable set id=id+500 where id < 50'...There is a way to obtaining the 'set id=..' and the where clause in some way? Thanks! Gerardo