Install new perl test function in PostgreSQL

Поиск
Список
Период
Сортировка
От Jignesh Shah
Тема Install new perl test function in PostgreSQL
Дата
Msg-id c11950270908251001q51fcb29j75b73fb8f1cf6510@mail.gmail.com
обсуждение исходный текст
Ответы Re: Install new perl test function in PostgreSQL  (Jure Kobal <j.kobal@gmx.com>)
Список pgsql-novice
Hi,

I have taken below perl example form PostgreSQL documentation Chapter: 40.1

CREATE FUNCTION perl_max (integer, integer) RETURNS integer AS $$
        if ($_[0] > $_[1]) { return $_[0]; }
        return $_[1];
$$ LANGUAGE plperl;

I understood everything but I don't know how to integrate/install this new function with PostgreSQL so that when I run "select perl_max(1,2)" query, it returns 2. I have PostgreSQL install on one of my UNIX Server and has root privileges. Please help me to install this function.

Thanks,
Jignesh

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

Предыдущее
От: Lennin Caro
Дата:
Сообщение: Re: compilation error
Следующее
От: Jure Kobal
Дата:
Сообщение: Re: Install new perl test function in PostgreSQL