Bug #745: PL/Perl function fails if not called first, under solaris

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #745: PL/Perl function fails if not called first, under solaris
Дата
Msg-id 20020823170456.BB0414759C6@postgresql.org
обсуждение исходный текст
Список pgsql-bugs
Erik G. Burrows (eburrows@erikburrows.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::PasswdMD5library for password encryption. This function is used extensively on my web site for security. When
operatingwith PostgreSQL under Linux (RH 7.3) everything works perfectly. However, when the same setup is duplicated on
myproduction Sun E450 runing Solaris 8, the function only works if it is the first 'action' of the connection. If any
otherfunctions are called first, or if any other SQL statement is executed, I get an error stating that the Perl
interperteris unable to find vars.pm in it's @INC array. That array is printed out, and within @INC is the directory in
whichvars.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
interperterfrom '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

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

Предыдущее
От:
Дата:
Сообщение: Remove A Column But Fail To Import
Следующее
От: Dmitry Tkach
Дата:
Сообщение: 'on delete' rule: bug or feature...