Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-02 Thread Pavel Stehule
2008/9/2 Tom Lane <[EMAIL PROTECTED]>: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: >> 2008/9/2 Tom Lane <[EMAIL PROTECTED]>: >>> BTW, there are actually two separate issues here: input parameters and >>> output parameters. After brief thought it seems like we should enforce >>> uniqueness of non

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-02 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > 2008/9/2 Tom Lane <[EMAIL PROTECTED]>: >> BTW, there are actually two separate issues here: input parameters and >> output parameters. After brief thought it seems like we should enforce >> uniqueness of non-omitted parameter names for IN parameters (i

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-02 Thread Pavel Stehule
2008/9/2 Tom Lane <[EMAIL PROTECTED]>: > "Pavel Stehule" <[EMAIL PROTECTED]> writes: >> 2008/9/1 Tom Lane <[EMAIL PROTECTED]>: >>> However, since this is a behavioral change that could break code that >>> works now, I think it should be a HEAD-only change; no backpatch. > >> I agree - it's could br

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-02 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > 2008/9/1 Tom Lane <[EMAIL PROTECTED]>: >> However, since this is a behavioral change that could break code that >> works now, I think it should be a HEAD-only change; no backpatch. > I agree - it's could break only 100% wrong code, but it could problem

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Pavel Stehule
2008/9/1 Tom Lane <[EMAIL PROTECTED]>: > Hannu Krosing <[EMAIL PROTECTED]> writes: >> So, should this be fixed at calling / SQL side (by not allowing >> repeating argument names) or at pl side for each pl separately ? > > I'm for fixing it just once, ie, in CREATE FUNCTION. I can't imagine > any s

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Tom Lane
Hannu Krosing <[EMAIL PROTECTED]> writes: > So, should this be fixed at calling / SQL side (by not allowing > repeating argument names) or at pl side for each pl separately ? I'm for fixing it just once, ie, in CREATE FUNCTION. I can't imagine any scenario where it's a good idea to have duplicate

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Hannu Krosing
On Mon, 2008-09-01 at 11:15 +0200, Pavel Stehule wrote: > 2008/9/1 Magnus Hagander <[EMAIL PROTECTED]>: > > Pavel Stehule wrote: > >> Hello > >> > >> 2008/8/31 Hannu Krosing <[EMAIL PROTECTED]>: > >>> > >>> hannu=# create or replace function ffa(a int, a int) returns int > >>> language plpgsql as

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Pavel Stehule
2008/9/1 Magnus Hagander <[EMAIL PROTECTED]>: > Pavel Stehule wrote: >> Hello >> >> 2008/8/31 Hannu Krosing <[EMAIL PROTECTED]>: >>> It seems that we allow several function arguments to have same >>> name (or is it label :) >>> >>> hannu=# create or replace function ff(a int, a int) returns int lan

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Magnus Hagander
Pavel Stehule wrote: > Hello > > 2008/8/31 Hannu Krosing <[EMAIL PROTECTED]>: >> It seems that we allow several function arguments to have same >> name (or is it label :) >> >> hannu=# create or replace function ff(a int, a int) returns int language >> plpgsql as $$begin return $1+$2; end;$$; >> C

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-09-01 Thread Pavel Stehule
Hello 2008/8/31 Hannu Krosing <[EMAIL PROTECTED]>: > It seems that we allow several function arguments to have same > name (or is it label :) > > hannu=# create or replace function ff(a int, a int) returns int language > plpgsql as $$begin return $1+$2; end;$$; > CREATE FUNCTION > hannu=# select f

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-08-31 Thread Dennis Bj�rklund
> hannu=# create or replace function ffa(a int, a int) returns int > language plpgsql as $$begin return a + a; end;$$; > CREATE FUNCTION > hannu=# select ffa(1,2); > ffa > - >2 > (1 row) > > Is this defined by some standard or just an oversight ? It's just an oversight. What about the si

Re: [HACKERS] Is this really really as designed or defined in some standard

2008-08-31 Thread David Fetter
On Mon, Sep 01, 2008 at 12:55:21AM +0300, Hannu Krosing wrote: > It seems that we allow several function arguments to have same > name (or is it label :) Ugh! > hannu=# create or replace function ff(a int, a int) returns int language > plpgsql as $$begin return $1+$2; end;$$; > CREATE FUNCTION >

[HACKERS] Is this really really as designed or defined in some standard

2008-08-31 Thread Hannu Krosing
It seems that we allow several function arguments to have same name (or is it label :) hannu=# create or replace function ff(a int, a int) returns int language plpgsql as $$begin return $1+$2; end;$$; CREATE FUNCTION hannu=# select ff(1,1); ff 2 (1 row) hannu=# select ff(1,2); ff