From: | pgsql-bugs(at)postgresql(dot)org |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Bug #745: PL/Perl function fails if not called first, under solaris |
Date: | 2002-08-23 17:04:56 |
Message-ID: | 20020823170456.BB0414759C6@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Erik G. Burrows (eburrows(at)erikburrows(dot)com) reports a bug with a severity of 2
The lower the number the more severe it is.
Short Description
PL/Perl function fails if not called first, under solaris
Long Description
I have a PL/Perl stored procedure, called encrypt_password (included in this report) which simply makes a call to the Crypt::PasswdMD5 library for password encryption. This function is used extensively on my web site for security. When operating with PostgreSQL under Linux (RH 7.3) everything works perfectly. However, when the same setup is duplicated on my production Sun E450 runing Solaris 8, the function only works if it is the first 'action' of the connection. If any other functions are called first, or if any other SQL statement is executed, I get an error stating that the Perl interperter is unable to find vars.pm in it's @INC array. That array is printed out, and within @INC is the directory in which vars.pm lives. The postgres user does have permission to get to and read this file.
Since vars.pm is part of the core Perl library, I am assuming that whatever is causing this error is preventing the interperter from 'use'ing any library files, and vars.pm is just the first one it's looking for.
Sample Code
-- DROP FUNCTION encrypt_password(VARCHAR, VARCHAR);
CREATE FUNCTION encrypt_password(VARCHAR, VARCHAR) RETURNS VARCHAR AS '
use Crypt::PasswdMD5;
my($cleartext, $salt) = @_;
my($crypttext);
$crypttext = unix_md5_crypt($cleartext, $salt);
return $crypttext;
' LANGUAGE 'plperlu';
No file was uploaded with this report
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Tkach | 2002-08-23 17:09:20 | 'on delete' rule: bug or feature... |
Previous Message | s mahendran | 2002-08-23 09:43:51 | regarding postgres |