Thats exactly what I'm facing here.
CREATE OR REPLACE FUNCTION test(int4)
RETURNS int4 AS
$BODY$
require "abc.pl"
$BODY$
LANGUAGE 'plperlu' VOLATILE;
SELECT test(23) doesn't run the script inside abc.pl that happens to
be a some insert statements.
Now, when i actually copy and paste t
Don't think it would work the way you are doing it.
This way it would only work if you dealing with shared objects in C where in
you dynamically load the shared object and then call a specific function of
that shared object.
Lately i tried the following for you but it doesn't execute the Insert
s
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"
$$ LANGUAG
I'm kind of confused how this require thing would actually work
because I tried testing it at my end at its really not working with
postgres.
I'm sure there is some fundamental mistake.
I have to do the following:
I have a perl file and need to call and use full functionaily of
this perl file i
so my syntax is correct? just wondering if there's some fundamental mistake
in it
~Harpreet
On 1/16/07, Tom Lane <[EMAIL PROTECTED]> wrote:
"Harpreet Dhaliwal" <[EMAIL PROTECTED]> writes:
> I was just wondering if one could use something like this
> CREATE FUNCTION *funcname* (*argument-types*
"Harpreet Dhaliwal" <[EMAIL PROTECTED]> 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 truste
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;
To include abc.pl here, how is the path of abc.pl specified. Also,
just wondering if the structure of above function is cor
I assume your choices are to include the entire script in a
PostgreSQL function or simply create a small stub function that calls
a function you have loaded with use or require (as mentioned by the
other poster). But either way, you have to create a function so you
can tell PostgreSQL what
So there is nothing called dynamic loading of perl code in postgres.
I'll have to include the whole perl script in the postgres function you mean?
Thanks,
Jas
On 1/16/07, John DeSoi <[EMAIL PROTECTED]> wrote:
Assuming you have pl/perl support compiled into PostgreSQL, just use
CREATE FUNCTION:
Assuming you have pl/perl support compiled into PostgreSQL, just use
CREATE FUNCTION:
http://www.postgresql.org/docs/8.2/interactive/plperl-funcs.html
On Jan 16, 2007, at 9:24 AM, Jasbinder Singh Bali wrote:
Actually I want to load my perl code in postgres function.
How would i do that?
I
TECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jasbinder Singh
Bali
Sent: Tuesday, January 16, 2007 8:07 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Dynamic loading of Perl Code in Postgres functions
Hi,
I have some perl code that I need to load dynamically in my postgres
function.
How ca
8:07 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Dynamic loading of Perl Code in Postgres functions
Hi,
I have some perl code that I need to load dynamically in my postgres
function.
How can this be accomplished?
I can do it in C using shared objects but don't know how would the same
Hi,
I have some perl code that I need to load dynamically in my postgres function.
How can this be accomplished?
I can do it in C using shared objects but don't know how would the same work
with perl.
Is there anything like shared objects in Perl or something.
Thanks,
Jas
13 matches
Mail list logo