From 29fd59a70b23102ac9f09b87e509a4a68a7df81d Mon Sep 17 00:00:00 2001 From: Kalle Sommer Nielsen Date: Wed, 20 Oct 2010 09:22:18 +0000 Subject: [PATCH] Fixed bug #52116 (pg_connect - how to use options) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@304555 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/pgsql/functions/pg-connect.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/reference/pgsql/functions/pg-connect.xml b/reference/pgsql/functions/pg-connect.xml index 24fe32cfdc..275d1189b6 100644 --- a/reference/pgsql/functions/pg-connect.xml +++ b/reference/pgsql/functions/pg-connect.xml @@ -60,6 +60,10 @@ service. Which of these arguments exist depends on your PostgreSQL version. + + The options parameter can be used to set command line parameters + to be invoked by the server. + @@ -103,6 +107,9 @@ $dbconn3 = pg_connect("host=sheep port=5432 dbname=mary user=lamb password=foo") $conn_string = "host=sheep port=5432 dbname=test user=lamb password=bar"; $dbconn4 = pg_connect($conn_string); //connect to a database named "test" on the host "sheep" with a username and password + +$dbconn5 = pg_connect("host=localhost options='--client_encoding=UTF8'"); +//connect to a database on "localhost" and set the command line parameter which tells the encoding is in UTF-8 ?> ]]>