X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 4734ED1EAEB for ; Thu, 6 May 2004 09:25:10 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 38668-03 for ; Thu, 6 May 2004 09:24:44 -0300 (ADT) Received: from web13908.mail.yahoo.com (web13908.mail.yahoo.com [216.136.175.71]) by svr1.postgresql.org (Postfix) with SMTP id 2DEE3D1F25F for ; Thu, 6 May 2004 09:24:30 -0300 (ADT) Message-ID: <20040506122433.71668.qmail@web13908.mail.yahoo.com> Received: from [80.67.100.162] by web13908.mail.yahoo.com via HTTP; Thu, 06 May 2004 05:24:33 PDT Date: Thu, 6 May 2004 05:24:33 -0700 (PDT) From: "Riccardo G. Facchini" Subject: new and old as parameter in a function To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/56 X-Sequence-Number: 17770 Hi. I'm having some trouble, and I would like to receive some input by the pg community... I would like to write a failry complex PLPGSQL trigger that calls a secondary function. The trigger calls the function with the NEW record that returns a variable of type RECORD whith the NEW variable modified accordingly to a series of actions. By Reading the documentation, I understand that I can write a PLPGSQL function that receives a parameter of type RECORD, and returns a parameter of type RECORD, and that this function is callable from a Trigger. But: I haven't been able to write what's expressed above... is there somebody that can provide some help and/or some examples? thanks in advance, ===== Riccardo G. Facchini