Re: insert in function writen in pgplsql

From: Szymon Guz <mabewlun(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Julius Tuskenis <julius(at)nsoft(dot)lt>, pgsql-admin(at)postgresql(dot)org
Subject: Re: insert in function writen in pgplsql
Date: 2010-03-19 19:16:15
Message-ID: e4edc9361003191216o34904967o7865a1dab35a4d6c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

2010/3/19 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> Szymon Guz <mabewlun(at)gmail(dot)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
>

Is alias also removed?
I've checked that and it works in 8.4

regards,
szymon guz

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Antoine POPINEAU 2010-03-19 23:19:10 Store database users in custom table
Previous Message Tom Lane 2010-03-19 18:45:00 Re: insert in function writen in pgplsql