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

Re: MD5 use in PL/Perl

From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: Marc Rassbach <marc(at)milestonerdl(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: MD5 use in PL/Perl
Date: 2000-12-30 04:45:29
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
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

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...


In response to


pgsql-general by date

Next:From: Tom LaneDate: 2000-12-30 05:05:50
Subject: Re: MD5 use in PL/Perl
Previous:From: Tom LaneDate: 2000-12-30 04:31:36
Subject: Re: Error opening pgaccess

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