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,10 @@
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>.
62
74
</para>
63
75
</refsect1>
64
76
...
...
@@ -74,26 +86,11 @@
74
86
</row>
75
87
</thead>
76
88
<tbody>
89
+
&pgsql.changelog.connection-object;
77
90
<row>
78
-
<entry>4.3.0</entry>
91
+
<entry>7.1.0</entry>
79
92
<entry>
80
-
This function is now fully implemented. Earlier versions ignores
81
-
database connection parameter.
82
-
</entry>
83
-
</row>
84
-
<row>
85
-
<entry>4.3.0</entry>
86
-
<entry>
87
-
The <literal>pgsql.ignore_notice</literal> and
88
-
<literal>pgsql.log_notice</literal> &php.ini; directives were added.
89
-
</entry>
90
-
</row>
91
-
<row>
92
-
<entry>4.0.6</entry>
93
-
<entry>
94
-
PHP 4.0.6 has problem with notice message handling. Use of the
95
-
PostgreSQL module with PHP 4.0.6 is not recommended even if you are
96
-
not using <function>pg_last_notice</function>.
93
+
The <parameter>mode</parameter> parameter was added.
97
94
</entry>
98
95
</row>
99
96
</tbody>
...
...
@@ -108,7 +105,7 @@
108
105
<example>
109
106
<title><function>pg_last_notice</function> example</title>
110
107
<programlisting role="php">
111
-
<![CDATA[
108
+
<![CDATA[
112
109
<?php
113
110
$pgsql_conn = pg_connect("dbname=mark host=localhost");
114
111
...
...
@@ -122,7 +119,7 @@
122
119
</programlisting>
123
120
&example.outputs;
124
121
<screen>
125
-
<![CDATA[
122
+
<![CDATA[
126
123
CREATE TABLE will create implicit sequence "test_id_seq" for "serial" column "test.id"
127
124
]]>
128
125
</screen>
...
...
@@ -141,7 +138,6 @@ CREATE TABLE will create implicit sequence "test_id_seq" for "serial" column "te
141
138
</refsect1>
142
139

143
140
</refentry>
144
-

145
141
<!-- Keep this comment at the end of the file
146
142
Local variables:
147
143
mode: sgml
148
144