Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id BF579633CE2 for ; Fri, 19 Mar 2010 15:45:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 08837-07 for ; Fri, 19 Mar 2010 18:45:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 248126327A9 for ; Fri, 19 Mar 2010 15:45:04 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o2JIj0AL003702; Fri, 19 Mar 2010 14:45:00 -0400 (EDT) To: Szymon Guz cc: Julius Tuskenis , pgsql-admin@postgresql.org Subject: Re: insert in function writen in pgplsql In-reply-to: References: <4BA37FF5.8060001@nsoft.lt> Comments: In-reply-to Szymon Guz message dated "Fri, 19 Mar 2010 18:27:16 +0100" Date: Fri, 19 Mar 2010 14:45:00 -0400 Message-ID: <3701.1269024300@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/144 X-Sequence-Number: 33943 Szymon Guz writes: > You won't have to change the parameters in the function definition, instead > you can use the RENAME clause: > CREATE OR REPLACE FUNCTION add_user(user varchar(20), password varchar(20) ) > RETURNS VOID AS $$ > DECLARE > RENAME user TO x_user; > RENAME pa TO x_password; > BEGIN I wouldn't recommend relying on that, because RENAME has been removed in 9.0. I'm not convinced that it would have worked as desired in previous versions either. regards, tom lane