Re: parameters in functions and overlap with names of columns

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: parameters in functions and overlap with names of columns
Date: 2009-08-04 14:01:58
Message-ID: 162867790908040701j1f69dc66w84f48c10b4f15c88@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2009/8/4 Ivan Sergio Borgonovo <mail(at)webthatworks(dot)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.

Pavel

>
> thanks
>
> --
> Ivan Sergio Borgonovo
> http://www.webthatworks.it
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Paul Taylor 2009-08-04 14:02:03 Re: Does derby have an embedded Mode like Derby ?
Previous Message Bill Moran 2009-08-04 13:56:27 Re: Does derby have an embedded Mode like Derby ?