Re: parameters in functions and overlap with names of columns - Mailing list pgsql-general

From Ivan Sergio Borgonovo
Subject Re: parameters in functions and overlap with names of columns
Date
Msg-id 20090804161648.0399d2ca@dawn.webthatworks.it
Whole thread Raw
In response to Re: parameters in functions and overlap with names of columns  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: parameters in functions and overlap with names of columns  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: parameters in functions and overlap with names of columns  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: parameters in functions and overlap with names of columns  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
On Tue, 4 Aug 2009 16:01:58 +0200
Pavel Stehule <pavel.stehule@gmail.com> wrote:

> 2009/8/4 Ivan Sergio Borgonovo <mail@webthatworks.it>:
> > I've
> >
> > create or replace function(...
> >
> > declare
> >  col1 varchar(32);
> > ...
> >
> >  create table pippo(
> >    col1 varchar(32),
> > ...
> >
> > Unfortunately I can't schema specify the column to avoid name
> > overlap.
> >
> > Is there another way other than just simply rename the variable?
>
> yes - the most common is an using of prefix '_' for local plpgsql
> variables. Other possibility is using qualified names.

Just to be sure... by qualified names you mean schema qualified name
or table qualified names in case of columns... right...

For a second I had the hope there was another way other than having a
col1, a _col1 and a __col1 too ;)

--
Ivan Sergio Borgonovo
http://www.webthatworks.it


pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Does derby have an embedded Mode like Derby ?
Next
From: Bill Moran
Date:
Subject: Re: Does derby have an embedded Mode like Derby ?