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

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

From: Stallone <stallone(at)pobox(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2107: Function INOUT parameter not returned to caller,
Date: 2005-12-12 16:08:04
Message-ID: 439DA064.7080502@pobox.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Tom Lane wrote:
> "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


This is very much my mistake.  I had indeed taken them to be a sort of
pass-by-reference parameter, and not part of the result definition,
which they actually are.  Running PERFORM is pointless, then, too.

In response to

pgsql-bugs by date

Next:From: Tony SDate: 2005-12-12 16:18:53
Subject: Re: BUG #2108: Function with OUT parameters not recognized,
Previous:From: Tom LaneDate: 2005-12-12 15:34:06
Subject: Re: BUG #2108: Function with OUT parameters not recognized, using plpgsql

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