Re: plpgsql - Mailing list pgsql-general

From Tom Lane
Subject Re: plpgsql
Date
Msg-id 5646.1066670973@sss.pgh.pa.us
Whole thread Raw
In response to Re: plpgsql  (Martin Marques <martin@bugs.unl.edu.ar>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Murthy Kambhampaty
Date:
Subject: Re: Recomended FS
Next
From: Steve Crawford
Date:
Subject: Re: Timestamp to date conversion...plz help me