Angus Lees <[EMAIL PROTECTED]> writes:
> from a quick look at plpgsql/src/gram.y, the decl_dtypename rule
> only allows type modifiers (decl_attypmod) on CHAR, VARCHAR or BPCHAR.
This is fixed in 7.2.
regards, tom lane
---(end of broadcast)---
PL/pgSQL docs say "PL/pgSQL variables can have any SQL datatype".
but when i try:
CREATE FUNCTION foo() RETURNS NUMERIC(5,2) AS '
DECLARE
bar NUMERIC(5,2);
BEGIN
bar := 123.45;
return bar;
END;
' LANGUAGE 'plpgsql';
then "select foo()" gives:
NOTICE: plpgsql: ERROR dur