reference/pgsql/functions/pg-pconnect.xml
c2eca73ef79ebe78cebb34053e41b565af504c4f
...
...
@@ -10,13 +10,13 @@
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
-
<type>resource</type><methodname>pg_pconnect</methodname>
13
+
<type class="union"><type>PgSql\Connection</type><type>false</type></type><methodname>pg_pconnect</methodname>
14
14
<methodparam><type>string</type><parameter>connection_string</parameter></methodparam>
15
-
<methodparam choice="opt"><type>int</type><parameter>connect_type</parameter></methodparam>
15
+
<methodparam choice="opt"><type>int</type><parameter>flags</parameter><initializer>0</initializer></methodparam>
16
16
</methodsynopsis>
17
17
<para>
18
18
<function>pg_pconnect</function> opens a connection to a
19
-
PostgreSQL database. It returns a connection resource that is
19
+
PostgreSQL database. It returns an <classname>PgSql\Connection</classname> instance that is
20
20
needed by other PostgreSQL functions.
21
21
</para>
22
22
<para>
...
...
@@ -24,17 +24,14 @@
24
24
the same <parameter>connection_string</parameter> as an existing connection, the
25
25
existing connection will be returned unless you pass
26
26
<constant>PGSQL_CONNECT_FORCE_NEW</constant> as
27
-
<parameter>connect_type</parameter>.
27
+
<parameter>flags</parameter>.
28
28
</para>
29
29
<para>
30
-
To enable persistent connection, the <link
31
-
linkend="ini.pgsql.allow-persistent">pgsql.allow_persistent</link>
30
+
To enable persistent connection, the <link linkend="ini.pgsql.allow-persistent">pgsql.allow_persistent</link>
32
31
&php.ini; directive must be set to &quot;On&quot; (which is the default).
33
-
The maximum number of persistent connection can be defined with the <link
34
-
linkend="ini.pgsql.max-persistent">pgsql.max_persistent</link>
32
+
The maximum number of persistent connection can be defined with the <link linkend="ini.pgsql.max-persistent">pgsql.max_persistent</link>
35
33
&php.ini; directive (defaults to -1 for no limit). The total number
36
-
of connections can be set with the <link
37
-
linkend="ini.pgsql.max-links">pgsql.max_links</link>
34
+
of connections can be set with the <link linkend="ini.pgsql.max-links">pgsql.max_links</link>
38
35
&php.ini; directive.
39
36
</para>
40
37
<para>
...
...
@@ -72,7 +69,7 @@
72
69
</listitem>
73
70
</varlistentry>
74
71
<varlistentry>
75
-
<term><parameter>connect_type</parameter></term>
72
+
<term><parameter>flags</parameter></term>
76
73
<listitem>
77
74
<para>
78
75
If <constant>PGSQL_CONNECT_FORCE_NEW</constant> is passed, then a new connection
...
...
@@ -88,10 +85,33 @@
88
85
<refsect1 role="returnvalues">
89
86
&reftitle.returnvalues;
90
87
<para>
91
-
PostgreSQL connection resource on success, &false; on failure.
88
+
Returns an <classname>PgSql\Connection</classname> instance on success, &return.falseforfailure;.
92
89
</para>
93
90
</refsect1>
94
91

92
+
<refsect1 role="changelog">
93
+
&reftitle.changelog;
94
+
<informaltable>
95
+
<tgroup cols="2">
96
+
<thead>
97
+
<row>
98
+
<entry>&Version;</entry>
99
+
<entry>&Description;</entry>
100
+
</row>
101
+
</thead>
102
+
<tbody>
103
+
<row>
104
+
<entry>8.1.0</entry>
105
+
<entry>
106
+
Returns an <classname>PgSql\Connection</classname> instance now;
107
+
previously, a &resource; was returned.
108
+
</entry>
109
+
</row>
110
+
</tbody>
111
+
</tgroup>
112
+
</informaltable>
113
+
</refsect1>
114
+
95
115
<refsect1 role="examples">
96
116
&reftitle.examples;
97
117
<para>
...
...
@@ -132,7 +152,6 @@ $dbconn4 = pg_pconnect($conn_string);
132
152
</para>
133
153
</refsect1>
134
154
</refentry>
135
-

136
155
<!-- Keep this comment at the end of the file
137
156
Local variables:
138
157
mode: sgml
139
158