Search Postgresql Archives

Re: Reassign value of IN parameter in 9.1.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

2011/11/24 Gavin Casey <gpjcasey@xxxxxxxxxxxxxx>:
> 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?
>

Read only parameters was confusing for people without knowledge
classic SP languages. Typical programming languages allows it. More
this limit has not real reason in PL/pgSQL and after remove , the
parameters are little bit more usable - try to implement buble sort.

Regards

Pavel Stehule



>
>

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux