Re: [GENERAL] PL/pgSQL

Поиск
Список
Период
Сортировка
От Sferacarta Software
Тема Re: [GENERAL] PL/pgSQL
Дата
Msg-id 16716.981111@bo.nettuno.it
обсуждение исходный текст
Ответ на PL/pgSQL  ("Sergei Chernev" <ser@nsu.ru>)
Список 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'-



В списке pgsql-general по дате отправления:

Предыдущее
От: Memphisto
Дата:
Сообщение: Is 6.4 out?
Следующее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [GENERAL] Is 6.4 out?