Hi all,
I just downloaded, compiled, and installed the following software without
problems on my RedHat 7.0, kernel 2.2.19
perl v5.6.1 (as shared library)
postgresql v7.1rc4
DBI 1.15
DBD::Pg v0.98
When I run the "make test" under the DBD::Pg source tree all tests are
executing fine with "Ok" but the Perl intepreter core dumps with a
segmentation fault at the second last statement in test.pl
...
$dbh0->do("DROP DATABASE $dbtest"); <-- Perl core dump
$dbh0->disconnect;
My postgresql log shows the following error message:
ERROR: DROP DATABASE: database "pgperltest" is being accessed by other
users
This is of course not true. I tried to add a sleep line before the drop
statement:
...
sleep(1);
$dbh0->do("DROP DATABASE $dbtest");
$dbh0->disconnect;
Now everything works ok??? What does this mean?
I also tried without sleep and with some simple error handling instead:
...
$dbh0->do("DROP DATABASE $dbtest") or print "drop error ", $DBI::errstr;
$dbh0->disconnect or print "disconnect error ", $DBI::errstr;
Now the "drop database" still fails but the program doesn't coredump, and
the disconnect works.
regards,
erik brenn
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.