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

From Tom Lane
Subject Re: Reassign value of IN parameter in 9.1.1
Date
Msg-id 25281.1322155976@sss.pgh.pa.us
Whole thread Raw
In response to Re: Reassign value of IN parameter in 9.1.1  (Gavin Casey <gpjcasey@googlemail.com>)
List pgsql-general
Gavin Casey <gpjcasey@googlemail.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

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: "CREATE TABLE table_name AS EXECUTE name WITH DATA" becomes syntax error.
Next
From: Philippe Lang
Date:
Subject: Convert string to UNICODE & migration FROM 7.4 to 9.1