Re: BUG #2107: Function INOUT parameter not returned to caller, causes plpgsql malfunctions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tony S" <tony(at)vectorsalad(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2107: Function INOUT parameter not returned to caller, causes plpgsql malfunctions
Date: 2005-12-12 15:32:51
Message-ID: 2139.1134401571@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Tony S" <tony(at)vectorsalad(dot)com> writes:
> Function defined with INOUT parameter. Value of parameter is not returned
> to calling function.

You are confused about the meaning and use of INOUT. It's not some kind
of pass-by-reference parameter, it's just a shorthand for separate IN
and OUT parameters. In your example, the PERFORM discards the function
result; the original value of 'outparameter' is not and cannot be
modified by the called function.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2005-12-12 15:34:06 Re: BUG #2108: Function with OUT parameters not recognized, using plpgsql
Previous Message Alvaro Herrera 2005-12-12 15:31:07 Re: [BUGS] BUG #2108: Function with OUT parameters not recognized, using plpgsql