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

From: Dennis Bjrklund <db(at)zigo(dot)dhs(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-09-01 06:25:29
Message-ID: 992a93c9b2afeb9758d0a04ca27ba776.squirrel@zigo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-09-01 06:29:29 Re: [PATCHES] VACUUM Improvements - WIP Patch
Previous Message David Fetter 2008-09-01 04:46:29 Re: Window functions patch v04 for the September commit fest