Re: [GENERAL] parameters in functions and overlap with names of columns

2009-08-04 Thread Pavel Stehule
2009/8/4 Ivan Sergio Borgonovo : > On Tue, 4 Aug 2009 16:01:58 +0200 > Pavel Stehule wrote: > >> 2009/8/4 Ivan Sergio Borgonovo : >> > I've >> > >> > create or replace function(... >> > >> > declare >> >  col1 varchar(32); >> > ... >> > >> >  create table pippo( >> >    col1 varchar(32), >> > ...

Re: [GENERAL] parameters in functions and overlap with names of columns

2009-08-04 Thread Pavel Stehule
2009/8/4 Alvaro Herrera : > Ivan Sergio Borgonovo wrote: >> On Tue, 4 Aug 2009 16:01:58 +0200 >> Pavel Stehule wrote: >> >> > 2009/8/4 Ivan Sergio Borgonovo : > >> > > Is there another way other than just simply rename the variable? >> > >> > yes - the most common is an using of prefix '_' for loc

Re: [GENERAL] parameters in functions and overlap with names of columns

2009-08-04 Thread Tom Lane
Ivan Sergio Borgonovo writes: > Pavel Stehule wrote: >> 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

Re: [GENERAL] parameters in functions and overlap with names of columns

2009-08-04 Thread Alvaro Herrera
Ivan Sergio Borgonovo wrote: > On Tue, 4 Aug 2009 16:01:58 +0200 > Pavel Stehule wrote: > > > 2009/8/4 Ivan Sergio Borgonovo : > > > 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 po

Re: [GENERAL] parameters in functions and overlap with names of columns

2009-08-04 Thread Ivan Sergio Borgonovo
On Tue, 4 Aug 2009 16:01:58 +0200 Pavel Stehule wrote: > 2009/8/4 Ivan Sergio Borgonovo : > > I've > > > > create or replace function(... > > > > declare > >  col1 varchar(32); > > ... > > > >  create table pippo( > >    col1 varchar(32), > > ... > > > > Unfortunately I can't schema specify the c

Re: [GENERAL] parameters in functions and overlap with names of columns

2009-08-04 Thread Pavel Stehule
2009/8/4 Ivan Sergio Borgonovo : > 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

Re: [GENERAL] parameters in functions and overlap with names of columns

2009-08-04 Thread Sam Mason
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 wi

[GENERAL] parameters in functions and overlap with names of columns

2009-08-04 Thread Ivan Sergio Borgonovo
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? thanks -- Ivan Sergio Borgonovo http://