Multiple db-connections? (Re: [imp] Still Postgres...)
Andreas Schyman
schyman@student.luth.se
Wed, 14 Mar 2001 18:24:28 +0100
I realize that this is a bug in php, since one should be able to open up multiple
connections to a dbs if one wants to.
I just wonder why you want to open up two identical connections to a dbs?
Why not send all queries through the first connection?
/Andreas
----- Original Message -----
From: "Rich Lafferty" <rich@horde.org>
To: <imp@lists.horde.org>
Sent: Wednesday, March 14, 2001 4:29 PM
Subject: Re: [imp] Still Postgres Persistent Conections problems
> On Wed, Mar 14, 2001 at 07:01:10AM -0600, Brent J. Nordquist =
(bjn@horde.org) wrote:
>
> Blah. There's a somewhat obscure and regressive PHP/Postgres mandelbug
> in which PHP apparently identifies open connections by the string used
> to open them, thinking for some reason that that's going to be
> unique. So you get
>
> $dba = pg_connect("name=foo password=bar database=baz");
> $dbb = pg_connect("name=foo password=bar database=baz");
> pg_close($dba);
> # $dbb may also be closed now
>
> But either of these work:
>
> $dba = pg_connect("name=foo password=bar database=baz");
> $dbb = pg_connect("name=foo password=bar database=baz =
");
>
> $dba = pg_connect("name=foo password=bar database=baz");
> $dbb = pg_connect("password=bar name=foo database=baz");
>
> For now, I guess, change back to pg_pconnect. :-/ I've opened a bug
> with the PHP guys; it's at <http://www.php.net/bugs.php?id=9746>. =
I'd
> really like to avoid messy hacks to get around this, but I'm not below
> them. :-)
>
> -Rich