On Tue, June 20, 2006 10:20 am, Geoffrey wrote: > > We considered that and have verified that we are not closing it. But, > the question came up, should we be passing it by reference or value? We > are doing the following: > > my $conn = Pg::connectdb ("dbname=$db port=$port"); . > . > my $retVal = &$prog($conn, @args); > > Question is, should we be doing: > > > my $retVal = &$prog(\$conn, @args); > > > FYI, there's no expectation of changing $conn in anyway within the sub > routines. You are using a completely outdated interface to postgres. Looking on CPAN, Pg.pm was last updated 04 Apr 2000. Which version of postgresql are you using? It is likely that the old interface blows up when connecting to a postgresql from >2000. -M