X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AD12653A2E for ; Thu, 21 Apr 2005 17:07:35 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86681-07 for ; Thu, 21 Apr 2005 20:07:28 +0000 (GMT) Received: from mail.99main.com (mail.99main.com [208.28.184.11]) by svr1.postgresql.org (Postfix) with ESMTP id D127A538AF for ; Thu, 21 Apr 2005 17:07:27 -0300 (ADT) Received: from 99main.com (localhost [127.0.0.1]) by mail.99main.com (8.12.8+Sun/8.12.8) with ESMTP id j3LK7RrX026847; Thu, 21 Apr 2005 16:07:27 -0400 (EDT) From: "Keith Worthington" To: "Joshua D. Drake" Cc: PostgreSQL Interfaces Reply-To: KeithW@narrowpathinc.com Subject: Re: plperl user function Date: Thu, 21 Apr 2005 16:07:27 -0400 Message-Id: <20050421200109.M30783@narrowpathinc.com> In-Reply-To: <42680480.7080805@commandprompt.com> References: <20050421194438.M68704@narrowpathinc.com> <42680480.7080805@commandprompt.com> X-Mailer: Open WebMail 2.50 20050106 X-OriginatingIP: 68.235.22.242 (npkeithw) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.01 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/67 X-Sequence-Number: 5483 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