pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Szymon Guz <mabewlun@gmail.com>
Cc: Julius Tuskenis <julius@nsoft.lt>
Cc: pgsql-admin@postgresql.org
Subject: Re: insert in function writen in pgplsql
Date: Fri, 19 Mar 2010 14:45:00 -0400
Message-ID: <3701.1269024300@sss.pgh.pa.us> (raw)
In-Reply-To: <e4edc9361003191027j785b8ba1oc5d5e7e0f59fe076@mail.gmail.com>
References: <4BA37FF5.8060001@nsoft.lt>
	<e4edc9361003191027j785b8ba1oc5d5e7e0f59fe076@mail.gmail.com>

Szymon Guz <mabewlun@gmail.com> 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



view thread (9+ messages)  latest in thread

Message-ID: <3701.1269024300@sss.pgh.pa.us>
Permalink:  ../3701.1269024300@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3701.1269024300@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mabewlun@gmail.com, julius@nsoft.lt
  Subject: Re: insert in function writen in pgplsql
  In-Reply-To: <3701.1269024300@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox