From: | David Fetter <david(at)fetter(dot)org> |
---|---|
To: | Hannu Krosing <hannu(at)2ndQuadrant(dot)com> |
Cc: | PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Is this really really as designed or defined in some standard |
Date: | 2008-08-31 22:22:07 |
Message-ID: | 20080831222207.GH3717@fetter.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
> hannu=# select ff(1,1);
> ff
> ----
> 2
> (1 row)
>
> hannu=# select ff(1,2);
> ff
> ----
> 3
> (1 row)
>
> 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 ?
This looks like a bug.
Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2008-08-31 22:50:51 | Re: TODO item: Implement Boyer-Moore searching (First time hacker) |
Previous Message | Marko Kreen | 2008-08-31 22:17:38 | [PATCH] In case module has wrong magic, report exact problem |