Re: parameters in functions and overlap with names of columns

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: parameters in functions and overlap with names of columns
Date: 2009-08-04 13:12:58
Message-ID: 20090804131258.GH5407@samason.me.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Aug 04, 2009 at 02:20:00PM +0200, Ivan Sergio Borgonovo wrote:
> create or replace function(...
> declare
> col1 varchar(32);

> Unfortunately I can't schema specify the column to avoid name
> overlap.

I think this is a limitation of plpgsql's parser; I tend to declare
local variables with an underscore prefix such as "_col1" in your
example.

> Is there another way other than just simply rename the variable?

I don't think so.

--
Sam http://samason.me.uk/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-08-04 13:14:19 Re: Does derby have an embedded Mode like Derby ?
Previous Message Andreas Kalsch 2009-08-04 13:02:28 Re: character 0xe29986 of encoding "UTF8" has no equivalent in "LATIN2"