Re: Dynamic loading of Perl Code in Postgres functions
От
Jasbinder Singh Bali
Тема
Re: Dynamic loading of Perl Code in Postgres functions
Дата
Msg-id
a47902760701181416v5046b69el5f1aa39fb5afd9db@mail.gmail.com
Ответ на
Re: Dynamic loading of Perl Code in Postgres functions (Harpreet Dhaliwal)
Список
Дерево обсуждения
Dynamic loading of Perl Code in Postgres functions "Jasbinder Singh Bali" <jsbali@gmail.com>
Re: Dynamic loading of Perl Code in Postgres functions "Adam Rich" <adam.r@sbcglobal.net>
Re: Dynamic loading of Perl Code in Postgres functions "Jasbinder Singh Bali" <jsbali@gmail.com>
Re: Dynamic loading of Perl Code in Postgres functions John DeSoi <desoi@pgedit.com>
Re: Dynamic loading of Perl Code in Postgres functions "Jasbinder Singh Bali" <jsbali@gmail.com>
Re: Dynamic loading of Perl Code in Postgres functions John DeSoi <desoi@pgedit.com>
Re: Dynamic loading of Perl Code in Postgres functions "Harpreet Dhaliwal" <harpreet.dhaliwal01@gmail.com>
Re: Dynamic loading of Perl Code in Postgres functions Tom Lane <tgl@sss.pgh.pa.us>
Re: Dynamic loading of Perl Code in Postgres functions "Harpreet Dhaliwal" <harpreet.dhaliwal01@gmail.com>
Re: Dynamic loading of Perl Code in Postgres functions "Jasbinder Singh Bali" <jsbali@gmail.com>
Re: Dynamic loading of Perl Code in Postgres functions "Jasbinder Singh Bali" <jsbali@gmail.com>
Re: Dynamic loading of Perl Code in Postgres functions "Harpreet Dhaliwal" <harpreet.dhaliwal01@gmail.com>
Re: Dynamic loading of Perl Code in Postgres functions "Jasbinder Singh Bali" <jsbali@gmail.com>
Lately i've been able to user 'require' command successfully and the
script was pretty straight forward and simple. I had to play around
with @INC.
Moving forward, I have another question here,
CREATE FUNCTION *funcname* (*argument-types*) RETURNS *return-type* AS
require " abc.pl"
$$ LANGUAGE plperlu;
In the above script if I have to call a particular sub-routine in abc.pl.
How can that be done?
I have to pass values to the arguments of a sub routine in abc.pl from
the the function funcname (arguments of the funcname in particular).
How would this thing be done?
Thanks,
Jas
On 1/16/07, Harpreet Dhaliwal wrote:
> so my syntax is correct? just wondering if there's some fundamental mistake
> in it
> ~Harpreet
>
>
> On 1/16/07, Tom Lane < tgl@sss.pgh.pa.us> wrote:
> > "Harpreet Dhaliwal" < harpreet.dhaliwal01@gmail.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
> >
>
>
В списке pgsql-general по дате отправления