On Thu, 28 Dec 2000, Marc Rassbach wrote:
> Idea 1) A call to a shell script. A question was asked back in 1999 if
> there was a way to use a shell script in an SQL call.....that person had
> no public responses. Moved onto
> Idea 2) use PL/Perl to take in the text to be hashed, and output the
> hash. Read the docs, looked on the list for more examples......
Nice try :) Good idea, however, you should take into account two things:
a) your functions run under "use Safe" and very restricted as far as what
they could do
b) your function is _not_ a package, it is only a sub, and hence cannot
'use' anything.
A thing to try for you is:
a) change plperl, and where it does 'require Safe;' do 'use MD5; require
Safe;', recompile, etc.
b) change plperl and change permit_only(':default') to
permit_only(':default','require')
It MIGHT work. You might have to add more ops that MD5 code uses though...
Good luck :)
Actually, a thing to consider would be to have a 'untrusted' PL/perl
language in postgres with use Safe disabled, along with a 'trusted' one.
(pluntrustedperl? plunsafeperl?) Same could be done for pltcl...
Comments?