Re: Is this really really as designed or defined in some standard - Mailing list pgsql-hackers

From Dennis Bj\xF6rklund
Subject Re: Is this really really as designed or defined in some standard
Date
Msg-id 992a93c9b2afeb9758d0a04ca27ba776.squirrel@zigo.org
Whole thread Raw
In response to Is this really really as designed or defined in some standard  (Hannu Krosing <hannu@2ndQuadrant.com>)
List pgsql-hackers
> 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 similar program

create or replace function ffa(int, int) returns int language plpgsql as $$
DECLARE a ALIAS FOR $1; a ALIAS FOR $2;
begin return a + a;
end;
$$;

I think ffa(a int, a int) should give an error but I don't know if the
ALIAS example above should (or even if it does, I don't have a pg
installation here to try it).

/Dennis



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: WIP: Column-level Privileges
Next
From: "Jaime Casanova"
Date:
Subject: Re: Extending grant insert on tables to sequences