Re: Dynamic loading of Perl Code in Postgres functions

From: "Harpreet Dhaliwal" <harpreet(dot)dhaliwal01(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "John DeSoi" <desoi(at)pgedit(dot)com>, "Jasbinder Singh Bali" <jsbali(at)gmail(dot)com>, "Adam Rich" <adam(dot)r(at)sbcglobal(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Dynamic loading of Perl Code in Postgres functions
Date: 2007-01-17 00:15:50
Message-ID: d86a77ef0701161615v3b1c961due38dcee19b43b68f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

so my syntax is correct? just wondering if there's some fundamental mistake
in it
~Harpreet

On 1/16/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "Harpreet Dhaliwal" <harpreet(dot)dhaliwal01(at)gmail(dot)com> writes:
> > I was just wondering if one could use something like this
>
> > CREATE FUNCTION *funcname* (*argument-types*) RETURNS *return-type* AS
> $$
> > require "abc.pl"
> > $$ LANGUAGE plperl;
>
> You'd have to use plperlu, since "require" isn't considered a trusted
> operation.
>
> > To include abc.pl here, how is the path of abc.pl specified.
>
> Same as you'd do it in plain Perl.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Fitzpatrick 2007-01-17 01:04:26 Process won't start in Windows
Previous Message Chad Wagner 2007-01-16 23:38:06 Re: Mounting a data dir read only