From: | Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | <Pgsql-General(at)hub(dot)org>, "Sergei Chernev" <ser(at)nsu(dot)ru> |
Subject: | Re: [GENERAL] PL/pgSQL |
Date: | 1998-11-11 16:11:21 |
Message-ID: | 16716.981111@bo.nettuno.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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'-
From | Date | Subject | |
---|---|---|---|
Next Message | Jackson, DeJuan | 1998-11-11 16:35:58 | RE: [GENERAL] Is 6.4 out? |
Previous Message | Robert Adam II | 1998-11-11 15:21:20 | Postgres 6.4 load problem |