Hello Sergei,
mercoledм, 11 novembre 98, you wrote:
SC> Hello,
SC> I've installed postgresql-v6.4 on BSDI-3.1
SC> But, there are two problems with PL/pgSQL:
SC> First: I have to install plpgsql language on every database,
SC> I wonder, if I can install it for everyone.
If you install PL/pgSQL on template1 it will automatically be copied to every
database you will create. This is not valid for databases created
before you install it on template1.
SC> Second: When I install plpgsql language, and prepare one test:
=>>CREATE FUNCTION f_test () RETURNS abstime AS '
=>> BEGIN
=>> RETURN \'now\';
=>> END;
=>>' LANGUAGE 'plpgsql';
SC> CREATE
SC> EOF
SC> Then I do:
=>> select f_test();
SC> It tells me, that:
SC> pqReadData() -- backend closed the channel unexpectedly.
SC> This probably means the backend terminated abnormally before or
SC> while pr
SC> ocessing the request.
SC> We have lost the connection to the backend, so further processing is
SC> impossible.
SC> Terminating.
SC> and exit me to the shell. What is wrong ?
On my Linux box it works:
CREATE FUNCTION f_test () RETURNS abstime AS '
BEGIN
RETURN \'now\';
END;
' LANGUAGE 'plpgsql';
CREATE
select f_test();
f_test
----------------------
1998-11-11 18:57:46+01
(1 row)
-Jose'-