reference/pgsql/functions/pg-port.xml
c2eca73ef79ebe78cebb34053e41b565af504c4f
...
...
@@ -12,12 +12,12 @@
12
12
<refsect1 role="description">
13
13
&reftitle.description;
14
14
<methodsynopsis>
15
-
<type>int</type><methodname>pg_port</methodname>
16
-
<methodparam choice="opt"><type>resource</type><parameter>connection</parameter></methodparam>
15
+
<type>string</type><methodname>pg_port</methodname>
16
+
<methodparam choice="opt"><type class="union"><type>PgSql\Connection</type><type>null</type></type><parameter>connection</parameter><initializer>&null;</initializer></methodparam>
17
17
</methodsynopsis>
18
18
<para>
19
19
<function>pg_port</function> returns the port number that the
20
-
given PostgreSQL <parameter>connection</parameter> resource is
20
+
given PostgreSQL <parameter>connection</parameter> instance is
21
21
connected to.
22
22
</para>
23
23
</refsect1>
...
...
@@ -29,12 +29,7 @@
29
29
<varlistentry>
30
30
<term><parameter>connection</parameter></term>
31
31
<listitem>
32
-
<para>
33
-
PostgreSQL database connection resource. When
34
-
<parameter>connection</parameter> is not present, the default connection
35
-
is used. The default connection is the last connection made by
36
-
<function>pg_connect</function> or <function>pg_pconnect</function>.
37
-
</para>
32
+
&pgsql.parameter.connection-with-nullable-default;
38
33
</listitem>
39
34
</varlistentry>
40
35
</variablelist>
...
...
@@ -44,12 +39,35 @@
44
39
<refsect1 role="returnvalues">
45
40
&reftitle.returnvalues;
46
41
<para>
47
-
An <type>int</type> containing the port number of the database
42
+
A <type>string</type> containing the port number of the database
48
43
server the <parameter>connection</parameter> is to,
49
-
or &false; on error.
44
+
or empty string on error.
50
45
</para>
51
46
</refsect1>
52
47

48
+
<refsect1 role="changelog">
49
+
&reftitle.changelog;
50
+
<informaltable>
51
+
<tgroup cols="2">
52
+
<thead>
53
+
<row>
54
+
<entry>&Version;</entry>
55
+
<entry>&Description;</entry>
56
+
</row>
57
+
</thead>
58
+
<tbody>
59
+
&pgsql.changelog.connection-object;
60
+
<row>
61
+
<entry>8.0.0</entry>
62
+
<entry>
63
+
<parameter>connection</parameter> is now nullable.
64
+
</entry>
65
+
</row>
66
+
</tbody>
67
+
</tgroup>
68
+
</informaltable>
69
+
</refsect1>
70
+
53
71
<refsect1 role="examples">
54
72
&reftitle.examples;
55
73
<para>
...
...
@@ -73,7 +91,6 @@ if ($pgsql_conn) {
73
91
</para>
74
92
</refsect1>
75
93
</refentry>
76
-

77
94
<!-- Keep this comment at the end of the file
78
95
Local variables:
79
96
mode: sgml
80
97