--postgresql-v6.4/src/pl/plpgsql/src/INSTALL says:
... If you declare the language in the template1 database, any subsequently created database will have
PL/pgSQL support installed automatically.
--I declared PL/pgSQL in the template1 database but I have an ERROR
message when I try to
--use PL/pgSQL language in another database.
create function nvl(integer) returns integer as
'declare nonullo alias for $1;
begin if nonullo then return nonullo; else return 0; end if;end;
' language 'plpgsql';
ERROR: Unrecognized language specified in a CREATE FUNCTION:
'plpgsql'. Recogn
ized languages are sql, C, internal and the created procedural
languages.
--Seems that I must to declare PL/pgSQL in every database.
--Any ideas?
--Please relply to sferac@bo.nettuno.it
--Jose-