Re: plperl user function

Поиск
Список
Период
Сортировка
От Keith Worthington
Тема Re: plperl user function
Дата
Msg-id 20050422121739.M32137@narrowpathinc.com
обсуждение исходный текст
Ответ на Re: plperl user function  ("Joshua D. Drake" <jd@commandprompt.com>)
Ответы Re: plperl user function  (Sean Davis <sdavis2@mail.nih.gov>)
Re: plperl user function  (Kenneth Marshall <ktm@it.is.rice.edu>)
Список pgsql-interfaces
> > 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.  I say apparently
> >     because if you remember I started learning this language 3 days
> >     ago and must be considered a neophyte. :-)

> You can't use "use" instruction for security reason. All disk access
> are denied and use need a disk access.
> 
> I think you need to use plperlu.

Yes.  That fixed my use problems.  I am not sure I like the idea of using an
untrusted language.  I wonder if it causes a potential security issue.

> 2)  What is wrong with the use of RETURN?

According to Michael (whose email I can't access at the moment) it has to be
lowercase.  I never dreamed Perl would be case sensitive but after changing
the case, voila! :-)
> > Another question:  Is there an issue with using the untrusted perl
> > language?
> 
> IIRC you have to be a postgresql superuser (postgres) to execute an 
> untrusted language function.

I just tested the untrusted function using a normal user and it worked.

> > If the code is tested and working is there any real reason to
> > continue to have "use strict;" and "use warnings;" in the function?
> 
> Only for manageability in the future.

Hmmm well I have this gut feeling that it is better to use a trusted language
than an untrusted one but I have no idea if that is supported by fact.  My
inclination is that now that the function is working and tested that I should
comment out the two "use" commands and recreate the function with the trusted
version.

Kind Regards,
Keith


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Korry
Дата:
Сообщение: Re: plperl user function
Следующее
От: Sean Davis
Дата:
Сообщение: Re: plperl user function