Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group