reference/pgsql/functions/pg-connect.xml
c2eca73ef79ebe78cebb34053e41b565af504c4f
...
...
@@ -10,9 +10,9 @@
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
12
<methodsynopsis>
13
-
<type>resource</type><methodname>pg_connect</methodname>
13
+
<type class="union"><type>PgSql\Connection</type><type>false</type></type><methodname>pg_connect</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_connect</function> opens a connection to a
...
...
@@ -24,7 +24,7 @@
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
30
The old syntax with multiple parameters
...
...
@@ -67,7 +67,7 @@
67
67
</listitem>
68
68
</varlistentry>
69
69
<varlistentry>
70
-
<term><parameter>connect_type</parameter></term>
70
+
<term><parameter>flags</parameter></term>
71
71
<listitem>
72
72
<para>
73
73
If <constant>PGSQL_CONNECT_FORCE_NEW</constant> is passed, then a new connection
...
...
@@ -89,33 +89,31 @@
89
89
<refsect1 role="returnvalues">
90
90
&reftitle.returnvalues;
91
91
<para>
92
-
PostgreSQL connection resource on success, &false; on failure.
92
+
Returns an <classname>PgSql\Connection</classname> instance on success, &return.falseforfailure;.
93
93
</para>
94
94
</refsect1>
95
95

96
96
<refsect1 role="changelog">
97
97
&reftitle.changelog;
98
-
<para>
99
-
<informaltable>
100
-
<tgroup cols="2">
101
-
<thead>
102
-
<row>
103
-
<entry>&Version;</entry>
104
-
<entry>&Description;</entry>
105
-
</row>
106
-
</thead>
107
-
<tbody>
108
-
<row>
109
-
<entry>5.6.0</entry>
110
-
<entry>
111
-
Support for giving the <constant>PGSQL_CONNECT_ASYNC</constant>
112
-
constant as the <parameter>connect_type</parameter> was added.
113
-
</entry>
114
-
</row>
115
-
</tbody>
116
-
</tgroup>
117
-
</informaltable>
118
-
</para>
98
+
<informaltable>
99
+
<tgroup cols="2">
100
+
<thead>
101
+
<row>
102
+
<entry>&Version;</entry>
103
+
<entry>&Description;</entry>
104
+
</row>
105
+
</thead>
106
+
<tbody>
107
+
<row>
108
+
<entry>8.1.0</entry>
109
+
<entry>
110
+
Returns an <classname>PgSql\Connection</classname> instance now;
111
+
previously, a &resource; was returned.
112
+
</entry>
113
+
</row>
114
+
</tbody>
115
+
</tgroup>
116
+
</informaltable>
119
117
</refsect1>
120
118

121
119
<refsect1 role="examples">
...
...
@@ -163,7 +161,6 @@ $dbconn5 = pg_connect("host=localhost options='--client_encoding=UTF8'");
163
161
</para>
164
162
</refsect1>
165
163
</refentry>
166
-

167
164
<!-- Keep this comment at the end of the file
168
165
Local variables:
169
166
mode: sgml
170
167