Received: from snatch.newsnipple.com ([64.71.188.74]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0BIXXB87280 for ; Fri, 11 Jan 2002 13:33:37 -0500 (EST) (envelope-from adam@snatch.newsnipple.com) Received: by snatch.newsnipple.com (Postfix, from userid 100) id 03DBF4B395; Fri, 11 Jan 2002 10:33:27 -0800 (PST) Date: Fri, 11 Jan 2002 10:33:27 -0800 From: Adam Haberlach To: pgsql-php@postgresql.org Subject: Re: passing resource id's through functions Message-ID: <20020111103327.A28869@newsnipple.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from cmr@shell.gis.net on Fri, Jan 11, 2002 at 10:44:05AM -0500 X-Archive-Number: 200201/11 X-Sequence-Number: 818 On Fri, Jan 11, 2002 at 10:44:05AM -0500, Chadwick Rolfs wrote: > I seem to have figured out that pg_connect returns a resource ID that will > not pass into another function, and that pg_pconnect does. I'm not too > keen on the persistent connections. Can someone confirm this belief? I'm > trying to remember where on php.net I read how to pass pg_connect > resources to other functions, and haven't found it at functions, > persistent connections, pg_connect or pg_pconnect. Hmm--I've never had any problems with passing the database connection handle from pg_connect into pg_exec (the only place you can really use it, as far as I know). On the other hand, I did have some problems with a multi-virtualhosted system where persistent connections were being passed back and forth between two different hosts with different databases, which confused some of the transaction-handling bits. (of course, I'm still not sure how much of a benefit there is with persistant connections if you db is local [like most people's are], but that's one to argue about somewhere else). -- Adam Haberlach | Who buys an eight-processor machine and then adam@newsnipple.com | watches 30 movies on it all at the same time? http://newsnipple.com | Beats me. They told us they could sell it, so | we made it. -- George Hoffman, Be Engineer