Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0f427df

Browse files
committed
Allow plpgsql IN parameters to be assigned to. Since the parameters are just
preinitialized local variables, this does not affect the function's semantics as seen by callers; allowing assignment simply avoids the need to create more local variables in some cases. In any case we were being rather inconsistent since only scalar parameters were getting marked constant. No documentation change, since parameters were never documented as being marked constant anyway. Steve Prentice
1 parent 94f238c commit 0f427df

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/pl/plpgsql/src/pl_comp.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.137 2009/07/12 17:12:34 tgl Exp $
11+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.138 2009/09/20 01:53:32 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -424,10 +424,6 @@ do_compile(FunctionCallInfo fcinfo,
424424
if (argvariable->dtype == PLPGSQL_DTYPE_VAR)
425425
{
426426
argitemtype = PLPGSQL_NSTYPE_VAR;
427-
/* input argument vars are forced to be CONSTANT */
428-
if (argmode == PROARGMODE_IN ||
429-
argmode == PROARGMODE_VARIADIC)
430-
((PLpgSQL_var *) argvariable)->isconst = true;
431427
}
432428
else
433429
{

0 commit comments

Comments
 (0)