Re: [HACKERS] pl/pgsql breakage in 8.1b4?

2005-10-28 Thread Jim C. Nasby
On Fri, Oct 28, 2005 at 12:10:00AM -0400, Tom Lane wrote: Philip Yarra [EMAIL PROTECTED] writes: Without really wishing to volunteer myself: should plpgsql allow using parameters with the same name as the columns being referred to within the function, provided they're qualified as

[HACKERS] pl/pgsql breakage in 8.1b4?

2005-10-27 Thread Philip Yarra
Just testing pl/pgsql functions in 8.1beta4, I see failures for syntax that works in 8.0.3. The simplest test case for this is: create table ptest(foo int, bar varchar(10)); create or replace function modify_ptest( foo int, bar varchar) returns numeric as $$ declare res

Re: [HACKERS] pl/pgsql breakage in 8.1b4?

2005-10-27 Thread Stephan Szabo
On Fri, 28 Oct 2005, Philip Yarra wrote: Just testing pl/pgsql functions in 8.1beta4, I see failures for syntax that works in 8.0.3. The simplest test case for this is: The function below fails for me similarly in 8.0.3 on execution. 8.1 merely tells you at creation time. Using bar and foo

Re: [HACKERS] pl/pgsql breakage in 8.1b4?

2005-10-27 Thread Philip Yarra
On Fri, 28 Oct 2005 01:37 pm, Stephan Szabo wrote: The function below fails for me similarly in 8.0.3 on execution. 8.1 merely tells you at creation time. Ah, good point... works for very small values of works then :-) My mistake. Using bar and foo as both parameter names and the field

Re: [HACKERS] pl/pgsql breakage in 8.1b4?

2005-10-27 Thread Tom Lane
Philip Yarra [EMAIL PROTECTED] writes: Without really wishing to volunteer myself: should plpgsql allow using parameters with the same name as the columns being referred to within the function, provided they're qualified as function_name.parameter? No, because that just changes where the

Re: [HACKERS] pl/pgsql breakage in 8.1b4?

2005-10-27 Thread Philip Yarra
On Fri, 28 Oct 2005 02:10 pm, Tom Lane wrote: Without really wishing to volunteer myself: should plpgsql allow using parameters with the same name as the columns being referred to within the function, provided they're qualified as function_name.parameter? No, because that just changes

Re: [HACKERS] pl/pgsql breakage in 8.1b4?

2005-10-27 Thread Tom Lane
Philip Yarra [EMAIL PROTECTED] writes: Hmmm... is it feasible to make the error message a little more useful? People who didn't use the old-style positional parameters might not understand where $1 and $2 are coming from. Not sure how --- the arm's-length relationship between plpgsql and the

Re: [HACKERS] pl/pgsql breakage in 8.1b4?

2005-10-27 Thread Philip Yarra
On Fri, 28 Oct 2005 03:03 pm, Tom Lane wrote: Philip Yarra [EMAIL PROTECTED] writes: Hmmm... is it feasible to make the error message a little more useful? People who didn't use the old-style positional parameters might not understand where $1 and $2 are coming from. Not sure how --- the