From 20f0b907b979671c93f8fd1e9a0a6c907f075f48 Mon Sep 17 00:00:00 2001 From: Christopher Kings-Lynne Date: Mon, 4 Jul 2005 05:01:28 +0000 Subject: [PATCH] Document pg_pconnect. Make fix similar to jsgoupil's but in pg_send_query. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@189848 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/pgsql/functions/pg-pconnect.xml | 85 ++++++++++++++++++++- reference/pgsql/functions/pg-send-query.xml | 8 +- 2 files changed, 86 insertions(+), 7 deletions(-) diff --git a/reference/pgsql/functions/pg-pconnect.xml b/reference/pgsql/functions/pg-pconnect.xml index 74cb002727..7011c03960 100644 --- a/reference/pgsql/functions/pg-pconnect.xml +++ b/reference/pgsql/functions/pg-pconnect.xml @@ -1,5 +1,5 @@ - + @@ -20,8 +20,11 @@ needed by other PostgreSQL functions. - For a description of the connection_string - parameter, see pg_connect. + If a second call is made to pg_pconnect with + the same connection_string as an existing connection, the + existing connection will be returned unless you pass + PGSQL_CONNECT_FORCE_NEW as + connect_type. To enable persistent connection, the + + &reftitle.parameters; + + + + connection_string + + + The connection_string can be empty to use all default parameters, or it + can contain one or more parameter settings separated by whitespace. + Each parameter setting is in the form keyword = value. Spaces around + the equal sign are optional. To write an empty value or a value + containing spaces, surround it with single quotes, e.g., keyword = + 'a value'. Single quotes and backslashes within the value must be + escaped with a backslash, i.e., \' and \\. + + + The currently recognized parameter keywords are: + host, hostaddr, port, + dbname, user, + password, connect_timeout, + options, tty (ignored), sslmode, + requiressl (deprecated in favor of sslmode), and + service. Which of these arguments exist depends + on your PostgreSQL version. + + + + + connect_type + + + If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection + is created, even if the connection_string is identical to + an existing connection. + + + + + + + + + &reftitle.returnvalues; + + PostgreSQL connection resource on success, &false; on failure. + + + + + &reftitle.examples; + + + Using <function>pg_pconnect</function> + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-send-query.xml b/reference/pgsql/functions/pg-send-query.xml index f3d28a3e89..355331c3f2 100644 --- a/reference/pgsql/functions/pg-send-query.xml +++ b/reference/pgsql/functions/pg-send-query.xml @@ -1,5 +1,5 @@ - + @@ -59,7 +59,7 @@ echo "$res1 has $rows1 records\n\n"; $res2 = pg_get_result($dbconn); - echo "second call to pg_get_result(): $res2\n"; + echo "Second call to pg_get_result(): $res2\n"; $rows2 = pg_num_rows($res2); echo "$res2 has $rows2 records\n"; ?> @@ -68,10 +68,10 @@ &example.outputs;