reference/pgsql/functions/pg-last-notice.xml
c2eca73ef79ebe78cebb34053e41b565af504c4f
...
...
@@ -1,7 +1,7 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
3
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.82 -->
4
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.pg-last-notice">
4
+
<refentry xml:id="function.pg-last-notice" xmlns="http://docbook.org/ns/docbook">
5
5
<refnamediv>
6
6
<refname>pg_last_notice</refname>
7
7
<refpurpose>
...
...
@@ -12,8 +12,9 @@
12
12
<refsect1 role="description">
13
13
&reftitle.description;
14
14
<methodsynopsis>
15
-
<type>string</type><methodname>pg_last_notice</methodname>
16
-
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
15
+
<type class="union"><type>array</type><type>string</type><type>bool</type></type><methodname>pg_last_notice</methodname>
16
+
<methodparam><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
17
+
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>PGSQL_NOTICE_LAST</constant></initializer></methodparam>
17
18
</methodsynopsis>
18
19
<para>
19
20
<function>pg_last_notice</function> returns the last notice
...
...
@@ -45,8 +46,16 @@
45
46
<varlistentry>
46
47
<term><parameter>connection</parameter></term>
47
48
<listitem>
49
+
&pgsql.parameter.connection;
50
+
</listitem>
51
+
</varlistentry>
52
+
<varlistentry>
53
+
<term><parameter>mode</parameter></term>
54
+
<listitem>
48
55
<para>
49
-
PostgreSQL database connection resource.
56
+
One of <constant>PGSQL_NOTICE_LAST</constant> (to return last notice),
57
+
<constant>PGSQL_NOTICE_ALL</constant> (to return all notices),
58
+
or <constant>PGSQL_NOTICE_CLEAR</constant> (to clear notices).
50
59
</para>
51
60
</listitem>
52
61
</varlistentry>
...
...
@@ -58,7 +67,35 @@
58
67
&reftitle.returnvalues;
59
68
<para>
60
69
A <type>string</type> containing the last notice on the
61
-
given <parameter>connection</parameter>, or &false; on error.
70
+
given <parameter>connection</parameter> with
71
+
<constant>PGSQL_NOTICE_LAST</constant>,
72
+
an <type>array</type> with <constant>PGSQL_NOTICE_ALL</constant>,
73
+
a <type>bool</type> with <constant>PGSQL_NOTICE_CLEAR</constant>.
74
+
</para>
75
+
</refsect1>
76
+
77
+
<refsect1 role="changelog">
78
+
&reftitle.changelog;
79
+
<para>
80
+
<informaltable>
81
+
<tgroup cols="2">
82
+
<thead>
83
+
<row>
84
+
<entry>&Version;</entry>
85
+
<entry>&Description;</entry>
86
+
</row>
87
+
</thead>
88
+
<tbody>
89
+
&pgsql.changelog.connection-object;
90
+
<row>
91
+
<entry>7.1.0</entry>
92
+
<entry>
93
+
The <parameter>mode</parameter> parameter was added.
94
+
</entry>
95
+
</row>
96
+
</tbody>
97
+
</tgroup>
98
+
</informaltable>
62
99
</para>
63
100
</refsect1>
64
101

...
...
@@ -68,7 +105,7 @@
68
105
<example>
69
106
<title><function>pg_last_notice</function> example</title>
70
107
<programlisting role="php">
71
-
<![CDATA[
108
+
<![CDATA[
72
109
<?php
73
110
$pgsql_conn = pg_connect("dbname=mark host=localhost");
74
111
...
...
@@ -82,7 +119,7 @@
82
119
</programlisting>
83
120
&example.outputs;
84
121
<screen>
85
-
<![CDATA[
122
+
<![CDATA[
86
123
CREATE TABLE will create implicit sequence "test_id_seq" for "serial" column "test.id"
87
124
]]>
88
125
</screen>
...
...
@@ -101,7 +138,6 @@ CREATE TABLE will create implicit sequence "test_id_seq" for "serial" column "te
101
138
</refsect1>
102
139

103
140
</refentry>
104
-

105
141
<!-- Keep this comment at the end of the file
106
142
Local variables:
107
143
mode: sgml
108
144