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

Re: plperl user function

From: "Keith Worthington" <keithw(at)narrowpathinc(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: PostgreSQL Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: plperl user function
Date: 2005-04-21 20:07:27
Message-ID: 20050421200109.M30783@narrowpathinc.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
On Thu, 21 Apr 2005 12:52:32 -0700, Joshua D. Drake wrote
> > 
> > This leaves me with two questions.
> > 1)  Why can I not use "use strict;" or "use warnings;" as they
> > are apparently good perl programming practice.
> [snip]
> > Kind Regards,
> > Keith
> 
> Actually it is excellent practice so don't feel bad. The reason you 
> can't use them is that in order to support them in plPerl you have 
> to access the module. The module itself is a file on the filesystem.
> 
> You can not open files on the filesystem via a plperl function 
> unless you install it as untrusted.
> 
> Try installing plperlU and then running your function.
[snip]
> Sincerely,
> 
> Joshua D. Drake

Well, I am blown away by how this stuff works.  After a createlang command I
put the two use commands back into my function and changed the language.  Now
all I have to figure out is the RETURN problem.

Another question:  Is there an issue with using the untrusted perl language? 
If the code is tested and working is there any real reason to continue to have
"use strict;" and "use warnings;" in the function?

Kind Regards,
Keith

In response to

Responses

pgsql-interfaces by date

Next:From: Joshua D. DrakeDate: 2005-04-21 20:36:58
Subject: Re: plperl user function
Previous:From: Joshua D. DrakeDate: 2005-04-21 19:52:32
Subject: Re: plperl user function

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