"Robert Fitzpatrick" <robert@webtent.com> writes:
> CREATE OR REPLACE FUNCTION "public"."get_next" (varchar) RETURNS varchar AS'
> DECLARE
> var1 alias for $1;
> BEGIN
> var1 = chr( (ascii(var1) + 1) );
> ...
> ohc=> select get_next('a');
> ERROR: "$1" is declared CONSTANT
> CONTEXT: compile of PL/pgSQL function "get_next" near line 5
plpgsql does not allow you to overwrite an argument value.
regards, tom lane