RE: PostgreSQL w/ithreads
[email protected] ("Marc M. Adkins")
| Newsgroups | perl.ithreads |
|---|---|
| Message-ID | <[email protected]> |
> > Anyone know for certain that the Perl PostgreSQL drivers have
> or have not
> > been fixed for ithreads?
I got a response from the DBD::Pg mailing list:
-------------------------------------
The version in CVS should work with threading, but the version on CPAN
does not yet. You can download a cvs copy:
http://gborg.postgresql.org/project/dbdpg/projdisplay.php
or just add these three lines to Pg.pm and recompile:
diff -c -r1.37 Pg.pm
*** Pg.pm 10 Jun 2003 19:14:53 -0000 1.37
--- Pg.pm 22 Jun 2003 21:22:31 -0000
***************
*** 38,43 ****
--- 38,47 ----
$errstr = ""; # holds error string for DBI::errstr
$drh = undef; # holds driver handle once initialized
+ sub CLONE {
+ $drh = undef ;
+ }
+
sub driver{
return $drh if $drh;
my($class, $attr) = @_;
-------------------------------------
I've tried it and it seems to work just fine.
mma