[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ubuntu Studio 7.10 AMD64/PostgreSQL 8.3 suggested code for recently encountered login error....



Hi...I'm new to ledgerSMB and during a recent install I could not log in.  Here is the error after attempted login:

'ERROR:  function md5(double precision) does not exist'

I've modified the file DB.pm by changing line 160 from:

'my $fetchSequence = $dbh->prepare("SELECT nextval('session_session_id_seq'), md5(random());");'

to:

'my $fetchSequence = $dbh->prepare("SELECT nextval('session_session_id_seq'), md5(random()::text);");'

and this has solved the problem.  For some reason, perhaps related to the recent 64 bit version of PostgreSQL, the function random() must be explicitly cast to a text form for use by md5().

R Summers