pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam Haberlach <adam@newsnipple.com>
To: pgsql-php@postgresql.org
Subject: Re: passing resource id's through functions
Date: Fri, 11 Jan 2002 10:33:27 -0800
Message-ID: <20020111103327.A28869@newsnipple.com> (raw)
In-Reply-To: <Pine.SOL.3.96.1020111103856.19632A-100000@shell.gis.net>
References: <Pine.SOL.3.96.1020111103856.19632A-100000@shell.gis.net>

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



view thread (13+ messages)  latest in thread

Message-ID: <20020111103327.A28869@newsnipple.com>
Permalink:  ../20020111103327.A28869@newsnipple.com/
Also on:    postgresql.org/message-id/20020111103327.A28869@newsnipple.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: adam@newsnipple.com
  Subject: Re: passing resource id's through functions
  In-Reply-To: <20020111103327.A28869@newsnipple.com>
  References: <Pine.SOL.3.96.1020111103856.19632A-100000@shell.gis.net> <20020111103327.A28869@newsnipple.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox