Re: Reassign value of IN parameter in 9.1.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gavin Casey <gpjcasey(at)googlemail(dot)com>
Cc: Alban Hertroys <haramrae(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Reassign value of IN parameter in 9.1.1
Date: 2011-11-24 17:32:56
Message-ID: 25281.1322155976@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gavin Casey <gpjcasey(at)googlemail(dot)com> writes:
> It was actually the reassignment of an IN parameter that I was questioning,

That was changed in 9.0, per the release notes:

* Allow input parameters to be assigned values within PL/pgSQL
functions (Steve Prentice)

Formerly, input parameters were treated as being declared CONST,
so the function's code could not change their values. This
restriction has been removed to simplify porting of functions
from other DBMSes that do not impose the equivalent
restriction. An input parameter now acts like a local variable
initialized to the passed-in value.

As for := versus =, plpgsql has always accepted both.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Philippe Lang 2011-11-24 18:33:01 Convert string to UNICODE & migration FROM 7.4 to 9.1
Previous Message Adrian Klaver 2011-11-24 17:13:29 Re: "CREATE TABLE table_name AS EXECUTE name WITH DATA" becomes syntax error.