reference/pgsql/functions/pg-host.xml
c2eca73ef79ebe78cebb34053e41b565af504c4f
...
...
@@ -13,11 +13,11 @@
13
13
&reftitle.description;
14
14
<methodsynopsis>
15
15
<type>string</type><methodname>pg_host</methodname>
16
-
<methodparam choice="opt"><type>resource</type><parameter>connection</parameter></methodparam>
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_host</function> returns the host name of the given
20
-
PostgreSQL <parameter>connection</parameter> resource is
20
+
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>
...
...
@@ -45,10 +40,33 @@
45
40
&reftitle.returnvalues;
46
41
<para>
47
42
A <type>string</type> containing the name of the host the
48
-
<parameter>connection</parameter> is to, or &false; on error.
43
+
<parameter>connection</parameter> is to, or an empty string on error.
49
44
</para>
50
45
</refsect1>
51
46

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

86
103
<!-- Keep this comment at the end of the file
87
104
Local variables:
88
105
mode: sgml
89
106