Re: parameters in functions and overlap with names of columns

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

2009/8/4 Alvaro Herrera <alvherre(at)commandprompt(dot)com>:
> Ivan Sergio Borgonovo wrote:
>> On Tue, 4 Aug 2009 16:01:58 +0200
>> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>>
>> > 2009/8/4 Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>:
>
>> > > 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...
>
> In this case I think it also means you can qualify the variable names
> with the function name; and/or declare named blocks inside the function,
> and qualify the variables with the block name.

yes
Pavel

>
> --
> Alvaro Herrera                                http://www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>
> --
> 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

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2009-08-04 15:00:23 Re: parameters in functions and overlap with names of columns
Previous Message Paul Taylor 2009-08-04 14:56:05 Re: Does derby have an embedded Mode like Derby ?