Martin Marques <martin@bugs.unl.edu.ar> writes:
>> Line 2 of the function is not where your assignment is; there seems to
>> be something wrong with your first variable declaration.
> Great! I don't understand why I started putting tabs. The first 4 functions
> have spaces between the variable name and the type.
Okay. I've improved the error reporting here for 7.4. CVS tip now does
regression=# create function foo() returns int as '
regression'# declare
regression'# xyzint;
regression'# begin
regression'# ...
regression'# end' language plpgsql;
CREATE FUNCTION
regression=# select foo();
ERROR: invalid type name ""
CONTEXT: compile of PL/pgSQL function "foo" near line 2
which should be at least a little less confusing ...
regards, tom lane