Stuart Rison <stuart@ludwig.ucl.ac.uk> writes:
> CREATE FUNCTION test(int2) RETURNS int2 AS '
> SELECT field2 FROM test
> WHERE field1=$1;
> ' language 'sql';
> ERROR: There is no operator '=$' for types 'int2' and 'int4'
That case is ambiguous: is it field1 =$ 1 or field1 = $1 ? ("=$" is a
legal operator name according to Postgres.) So I don't have a problem
with disallowing that. But field1=NEW is not ambiguous under the
Postgres lexical rules, and plpgsql shouldn't be creating an
ambiguity...
regards, tom lane