#27824 [Opn->Csd]: pg_pconnect failing to create multiple connections per script

From: Date: Fri, 17 Sep 2004 13:37:31 +0000
Subject: #27824 [Opn->Csd]: pg_pconnect failing to create multiple connections per script
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969364108@lists.php.net to get a copy of this message
ID: 27824 Updated by: vrana@php.net Reported By: gwood at ewebengine dot com -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: FreeBSD 5.1-RELEASE-p10 PHP Version: 4.3.4 New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. "... no new connection will be established unless you pass PGSQL_CONNECT_FORCE_NEW as connect_type ..." Previous Comments: ------------------------------------------------------------------------ [2004-04-01 11:51:47] derick@php.net Oops, last one should be: pg_connect(string host, string port, int options, string tty, string db_name) ------------------------------------------------------------------------ [2004-04-01 11:51:05] derick@php.net It seems that it already exist, but it's not documented or no longer working correctly anymore. It *seems* that you can can pass it like this: pg_connect("conectionstring", PGSQL_CONNECT_FORCE_NEW); also, the order of parameters documented in the manaul for the old *deprecated* way for connecting to PGSQL is wrong: pg_connect("host", "port", "options", "tty", "dbname") from what I read from the source it should be: pg_connect(string connect_string [, int options ]) or pg_connect(string host, string port, string db_name ) or pg_connect(string host, string port, int options, string db_name) or pg_connect(string host, string port, int options, string db_name, string tty) ------------------------------------------------------------------------ [2004-04-01 09:56:20] derick@php.net Making this a feature request, as the MySQL extension actually has a parameter to force a new connection. ------------------------------------------------------------------------ [2004-04-01 09:52:38] gwood at ewebengine dot com You are exactly correct, I apologize: I was incorrect about my expectations of pg_connect(). I reread the documentation with regards to this and sure enough that is the expected behavior. In my testing I had mixed pg_pconnect() and pg_connect() which resulted in different results, hence my confusion. I guess I'll have to fool PHP into thinking that they're two separate connections by creating a junk user or an alias for the host name. Ugh. ------------------------------------------------------------------------ [2004-04-01 09:23:56] derick@php.net Non-persistent connections behave exactly the same as persistent ones for this too. If not, *that*'s a bug. Can you please verify that? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/27824 -- Edit this bug report at http://bugs.php.net/?id=27824&edit=1

« previous php.doc (#969364108) next »