Re: Need help with INOUT mis-understanding - Mailing list pgsql-general

From Tony Caduto
Subject Re: Need help with INOUT mis-understanding
Date
Msg-id 435F9C39.4000804@amsoftwaredesign.com
Whole thread Raw
In response to Re: Need help with INOUT mis-understanding  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Need help with INOUT mis-understanding  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane wrote:

>"Troy" <troy@hendrix.biz> 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 OUT
>parameter.
>
>            regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match
>
>
>
Tom,
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.

I would expect the behavior of a INOUT to be ths same as OUT, not the
same as a IN.

There have been many times I really could have even used IN params that
where not declared as CONST.

How difficult would it be to have INOUT params not declared as CONST?

Thanks,

Tony Caduto


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Quickly calculating row size of a table?
Next
From: "Andrus"
Date:
Subject: Re: FoxPro in WINE to Postgresql on LINUX?