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

From Tom Lane
Subject Re: Need help with INOUT mis-understanding
Date
Msg-id 6343.1130339739@sss.pgh.pa.us
Whole thread Raw
In response to Re: Need help with INOUT mis-understanding  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
Responses Re: Need help with INOUT mis-understanding  (Tony Caduto <tony_caduto@amsoftwaredesign.com>)
List pgsql-general
Tony Caduto <tony_caduto@amsoftwaredesign.com> 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.

                    /* input argument vars are forced to be CONSTANT */
                    if (argmode == PROARGMODE_IN)
                        ((PLpgSQL_var *) argvariable)->isconst = true;

Can you provide a test case that misbehaves that way?

            regards, tom lane

pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: Re: FoxPro in WINE to Postgresql on LINUX?
Next
From: "Andrus"
Date:
Subject: Why database is corrupted after re-booting