Reassign value of IN parameter in 9.1.1 - Mailing list pgsql-general

From Gavin Casey
Subject Reassign value of IN parameter in 9.1.1
Date
Msg-id CAMwtF+p3EPog=GxBZVk4v6Hw4UY+BkM8ivApLLjE00aV2ou_hg@mail.gmail.com
Whole thread Raw
Responses Re: Reassign value of IN parameter in 9.1.1  (Alban Hertroys <haramrae@gmail.com>)
Re: Reassign value of IN parameter in 9.1.1  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-general
This works in 9.1.1 but seems like a bug to me:

create function xout(_x INTEGER)
returns integer
as $$
begin
   _x = _x * 2;
   return _x;
end;
$$ LANGUAGE plpgsql;

select xout(4);

It would not have compiled in version 8.

I came across such a reassignement doing a code review and was surprised it compiled.

Is there a reason for the change in behaviour?


pgsql-general by date:

Previous
From: Gaëtan Allart
Date:
Subject: General performance/load issue
Next
From: "Tomas Vondra"
Date:
Subject: Re: General performance/load issue