Skip site navigation (1) Skip section navigation (2)

Install new perl test function in PostgreSQL

From: Jignesh Shah <jignesh(dot)shah1980(at)gmail(dot)com>
To: postgresql novice <pgsql-novice(at)postgresql(dot)org>
Subject: Install new perl test function in PostgreSQL
Date: 2009-08-25 17:01:44
Message-ID: c11950270908251001q51fcb29j75b73fb8f1cf6510@mail.gmail.com (view raw or flat)
Thread:
Lists: 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

Responses

pgsql-novice by date

Next:From: Jure KobalDate: 2009-08-25 17:54:41
Subject: Re: Install new perl test function in PostgreSQL
Previous:From: Lennin CaroDate: 2009-08-25 13:57:50
Subject: Re: compilation error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group