Re: ERROR: $1 is declared CONSTANT in plpgsql - Mailing list pgsql-novice

From Tom Lane
Subject Re: ERROR: $1 is declared CONSTANT in plpgsql
Date
Msg-id 23464.1020782431@sss.pgh.pa.us
Whole thread Raw
In response to ERROR: $1 is declared CONSTANT in plpgsql  (Hans Plum <plum@giub.uni-bonn.de>)
List pgsql-novice
Hans Plum <plum@giub.uni-bonn.de> writes:
>         DECLARE
>         InpAscii ALIAS FOR $1;
>         BEGIN
>         InpAscii := $1;

> NOTICE:  plpgsql: ERROR during compile of f_ascii2html near line 7
> ERROR:  $1 is declared CONSTANT

You can't assign to a function's input parameters.  That first
assignment is useless as well as incorrect (if it were allowed,
it'd effectively be $1 := $1, because of your ALIAS).

            regards, tom lane

pgsql-novice by date:

Previous
From: "Joshua b. Jore"
Date:
Subject: Re: Cascaded updates / deletes don't work on inherited
Next
From: Oliver Elphick
Date:
Subject: Re: ERROR: $1 is declared CONSTANT in plpgsql