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
This commit is contained in:
Kalle Sommer Nielsen 2010-10-20 09:22:18 +00:00
parent d25dd45e32
commit 29fd59a70b

View file

@ -60,6 +60,10 @@
<parameter>service</parameter>. Which of these arguments exist depends
on your PostgreSQL version.
</para>
<para>
The <parameter>options</parameter> parameter can be used to set command line parameters
to be invoked by the server.
</para>
</listitem>
</varlistentry>
<varlistentry>
@ -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
?>
]]>
</programlisting>