Skip to content

Commit 3b2503b

Browse files
authored
pg_pconnect(): Various minor fixes (#4429)
- Typos - Add various literal tags - Remove personalization
1 parent 65c5581 commit 3b2503b

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

reference/pgsql/functions/pg-pconnect.xml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</methodsynopsis>
1717
<para>
1818
<function>pg_pconnect</function> opens a connection to a
19-
PostgreSQL database. It returns an <classname>PgSql\Connection</classname> instance that is
19+
PostgreSQL database. It returns a <classname>PgSql\Connection</classname> instance that is
2020
needed by other PostgreSQL functions.
2121
</para>
2222
<para>
@@ -27,11 +27,14 @@
2727
<parameter>flags</parameter>.
2828
</para>
2929
<para>
30-
To enable persistent connection, the <link linkend="ini.pgsql.allow-persistent">pgsql.allow_persistent</link>
31-
&php.ini; directive must be set to &quot;On&quot; (which is the default).
32-
The maximum number of persistent connection can be defined with the <link linkend="ini.pgsql.max-persistent">pgsql.max_persistent</link>
33-
&php.ini; directive (defaults to -1 for no limit). The total number
34-
of connections can be set with the <link linkend="ini.pgsql.max-links">pgsql.max_links</link>
30+
To enable persistent connections, the
31+
<link linkend="ini.pgsql.allow-persistent">pgsql.allow_persistent</link>
32+
&php.ini; directive must be set to <literal>"On"</literal> (which is the default).
33+
The maximum number of persistent connections can be defined with the
34+
<link linkend="ini.pgsql.max-persistent">pgsql.max_persistent</link>
35+
&php.ini; directive (defaults to <literal>-1</literal> for no limit).
36+
The total number of connections can be set with the
37+
<link linkend="ini.pgsql.max-links">pgsql.max_links</link>
3538
&php.ini; directive.
3639
</para>
3740
<para>
@@ -54,7 +57,7 @@
5457
the equal sign are optional. To write an empty value or a value
5558
containing spaces, surround it with single quotes, e.g., <literal>keyword =
5659
'a value'</literal>. Single quotes and backslashes within the value must be
57-
escaped with a backslash, i.e., \' and \\.
60+
escaped with a backslash, i.e., <literal>\'</literal> and <literal>\\</literal>.
5861
</para>
5962
<para>
6063
The currently recognized parameter keywords are:
@@ -63,8 +66,8 @@
6366
<parameter>password</parameter>, <parameter>connect_timeout</parameter>,
6467
<parameter>options</parameter>, <parameter>tty</parameter> (ignored), <parameter>sslmode</parameter>,
6568
<parameter>requiressl</parameter> (deprecated in favor of <parameter>sslmode</parameter>), and
66-
<parameter>service</parameter>. Which of these arguments exist depends
67-
on your PostgreSQL version.
69+
<parameter>service</parameter>.
70+
Which of these arguments exist depends on the PostgreSQL version.
6871
</para>
6972
</listitem>
7073
</varlistentry>
@@ -85,7 +88,7 @@
8588
<refsect1 role="returnvalues">
8689
&reftitle.returnvalues;
8790
<para>
88-
Returns an <classname>PgSql\Connection</classname> instance on success, &return.falseforfailure;.
91+
Returns a <classname>PgSql\Connection</classname> instance on success, &return.falseforfailure;.
8992
</para>
9093
</refsect1>
9194

@@ -103,7 +106,7 @@
103106
<row>
104107
<entry>8.1.0</entry>
105108
<entry>
106-
Returns an <classname>PgSql\Connection</classname> instance now;
109+
Returns a <classname>PgSql\Connection</classname> instance now;
107110
previously, a &resource; was returned.
108111
</entry>
109112
</row>
@@ -120,18 +123,18 @@
120123
<programlisting role="php">
121124
<![CDATA[
122125
<?php
126+
// Connect to a database named "mary"
123127
$dbconn = pg_pconnect("dbname=mary");
124-
//connect to a database named "mary"
125128
129+
// Connect to a database named "mary" on "localhost" at port "5432"
126130
$dbconn2 = pg_pconnect("host=localhost port=5432 dbname=mary");
127-
// connect to a database named "mary" on "localhost" at port "5432"
128131
132+
// Connect to a database named "mary" on the host "sheep" with a username and password
129133
$dbconn3 = pg_pconnect("host=sheep port=5432 dbname=mary user=lamb password=foo");
130-
//connect to a database named "mary" on the host "sheep" with a username and password
131134
135+
// Connect to a database named "test" on the host "sheep" with a username and password
132136
$conn_string = "host=sheep port=5432 dbname=test user=lamb password=bar";
133137
$dbconn4 = pg_pconnect($conn_string);
134-
//connect to a database named "test" on the host "sheep" with a username and password
135138
?>
136139
]]>
137140
</programlisting>

0 commit comments

Comments
 (0)