"Troy" <[EMAIL PROTECTED]> writes:
> P.S. - Tom if the return of func2 = var_X = (10,5) how can I parse the
> varible out like:
> var_Y = var_X[1] -- first ARRAY item
> to get var_Y = 10?
Try assigning the function result to a RECORD variable, perhaps
SELECT * INTO rec FROM foo(...);
The
Tom's right, As in the first message of this thread kindof shows;
func2(INOUT) adds the var_1 to itself and ouputs back to func1 as the
updated value.
NOTICE: var_1 starts as 5
NOTICE: var_1 in func2 is 10
CONTEXT: PL/pgSQL function "func1" line 7 at assignment
NOTICE: var_X Now is (10,
> Probably not, if the way you seem to expect it to work is like Oracle.
> An INOUT parameter isn't some sort of modifiable by-reference variable,
> it's just a shorthand for declaring an IN parameter and an OUT
> parameter.
>
Thanks for the response.
That makes a lot of sense but I guess I was w
Tony Caduto <[EMAIL PROTECTED]> writes:
> So what you are saying is INOUT params are NOT constants and you can
> modify them in the function body?
If you couldn't modify them, there would be no way to return a new
value (ie, anything but the passed-in value), so it'd be pretty broken
IMHO ...
Tom Lane wrote:
Tony Caduto <[EMAIL PROTECTED]> writes:
I have noticed this as well, if I declare OUT params I can modify them
to my hearts content before they go out,
however if you declare it as a INOUT you can't modify it because it is
declared as a constant.
Uh, I don't think so.
Tony Caduto <[EMAIL PROTECTED]> writes:
> I have noticed this as well, if I declare OUT params I can modify them
> to my hearts content before they go out,
> however if you declare it as a INOUT you can't modify it because it is
> declared as a constant.
Uh, I don't think so.
Tom Lane wrote:
"Troy" <[EMAIL PROTECTED]> writes:
Does PL/PGSQL handle
INOUTS the same as ORACLE PL/SQL?
Probably not, if the way you seem to expect it to work is like Oracle.
An INOUT parameter isn't some sort of modifiable by-reference variable,
it's just a shorthand for declaring
"Troy" <[EMAIL PROTECTED]> writes:
> Does PL/PGSQL handle
> INOUTS the same as ORACLE PL/SQL?
Probably not, if the way you seem to expect it to work is like Oracle.
An INOUT parameter isn't some sort of modifiable by-reference variable,
it's just a shorthand for declaring an IN parameter and an OU
Yes, I'm a Newbie but I really like it so far except a few
misunderstandings I have, like INOUT. (I am using 8.1 beta 3 on both
WIN and FC w/ pgadmin III.)
I cannot use multiple in/out/inouts within functions to return results.
How can I use INOUTS the right way? Here I thought I'd get an updated