ID: 27824
Updated by: [EMAIL PROTECTED]
Reported By: gwood at ewebengine dot com
Status: Open
-Bug Type: Feature/Change Request
+Bug Type: Documentation problem
Operating System: FreeBSD 5.1-RELEASE-p10
PHP Version: 4.3.4
New Comment:
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)
Previous Comments:
------------------------------------------------------------------------
[2004-04-01 09:56:20] [EMAIL PROTECTED]
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] [EMAIL PROTECTED]
Non-persistent connections behave exactly the same as persistent ones
for this too. If not, *that*'s a bug. Can you please verify that?
------------------------------------------------------------------------
[2004-04-01 09:06:59] gwood at ewebengine dot com
If this isn't considered a bug, then the documentation is incorrect.
The documentation states that persistant connections can be swapped out
for non-persistant connections with no problem. This IS NOT TRUE for
the example I presented.
If this is expected behaviour this caveat needs to be added to the
warnings on the persistant connection page.
------------------------------------------------------------------------
[2004-04-01 08:53:00] [EMAIL PROTECTED]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
When creating a persistent connection PHP uses the provided
authentication information to determine is such connection
is already avaliable. This is why when using pg_pconnect
with the same data in one script would result in a single
connection.
------------------------------------------------------------------------
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