X-Original-To: pgsql-general-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 956A89FA5F0 for ; Tue, 20 Jun 2006 11:43:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 46056-10 for ; Tue, 20 Jun 2006 11:43:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from hs5.cfa.cmu.edu (HS5.CFA.cmu.edu [128.2.103.215]) by postgresql.org (Postfix) with ESMTP id BA4419FA219 for ; Tue, 20 Jun 2006 11:43:33 -0300 (ADT) Received: from webmail.webopticon.org (hs5.cfa.cmu.edu [127.0.0.1]) by hs5.cfa.cmu.edu (8.12.11.20060308/8.12.11) with ESMTP id k5KEhW80026546 for ; Tue, 20 Jun 2006 10:43:32 -0400 Received: from 216.41.12.254 (SquirrelMail authenticated user agentm) by webmail.webopticon.org with HTTP; Tue, 20 Jun 2006 10:43:32 -0400 (EDT) Message-ID: <55472.216.41.12.254.1150814612.squirrel@webmail.webopticon.org> In-Reply-To: <44980423.7080109@3times25.net> References: <4497F919.7050203@3times25.net> <20060620135945.GB25678@svana.org> <44980423.7080109@3times25.net> Date: Tue, 20 Jun 2006 10:43:32 -0400 (EDT) Subject: Re: help with error message from perl Pg From: "A.M." To: pgsql-general@postgresql.org User-Agent: SquirrelMail/1.5.1 [CVS] MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/802 X-Sequence-Number: 97174 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