reference/pgsql/functions/pg-copy-to.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.2 -->
4
-
<refentry xml:id='function.pg-copy-to' xmlns="http://docbook.org/ns/docbook">
4
+
<refentry xml:id="function.pg-copy-to" xmlns="http://docbook.org/ns/docbook">
5
5
<refnamediv>
6
6
<refname>pg_copy_to</refname>
7
7
<refpurpose>
...
...
@@ -12,11 +12,11 @@
12
12
<refsect1 role="description">
13
13
&reftitle.description;
14
14
<methodsynopsis>
15
-
<type>array</type><methodname>pg_copy_to</methodname>
16
-
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
15
+
<type class="union"><type>array</type><type>false</type></type><methodname>pg_copy_to</methodname>
16
+
<methodparam><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
17
17
<methodparam><type>string</type><parameter>table_name</parameter></methodparam>
18
-
<methodparam choice="opt"><type>string</type><parameter>delimiter</parameter></methodparam>
19
-
<methodparam choice="opt"><type>string</type><parameter>null_as</parameter></methodparam>
18
+
<methodparam choice="opt"><type>string</type><parameter>separator</parameter><initializer>"\t"</initializer></methodparam>
19
+
<methodparam choice="opt"><type>string</type><parameter>null_as</parameter><initializer>"\\\\N"</initializer></methodparam>
20
20
</methodsynopsis>
21
21
<para>
22
22
<function>pg_copy_to</function> copies a table to an array. It
...
...
@@ -32,9 +32,7 @@
32
32
<varlistentry>
33
33
<term><parameter>connection</parameter></term>
34
34
<listitem>
35
-
<para>
36
-
PostgreSQL database connection resource.
37
-
</para>
35
+
&pgsql.parameter.connection;
38
36
</listitem>
39
37
</varlistentry>
40
38
<varlistentry>
...
...
@@ -46,11 +44,11 @@
46
44
</listitem>
47
45
</varlistentry>
48
46
<varlistentry>
49
-
<term><parameter>delimiter</parameter></term>
47
+
<term><parameter>separator</parameter></term>
50
48
<listitem>
51
49
<para>
52
50
The token that separates values for each field in each element of
53
-
<parameter>rows</parameter>. Default is <literal>TAB</literal>.
51
+
<parameter>rows</parameter>. Default is <literal>\t</literal>.
54
52
</para>
55
53
</listitem>
56
54
</varlistentry>
...
...
@@ -59,7 +57,7 @@
59
57
<listitem>
60
58
<para>
61
59
How SQL <literal>NULL</literal> values are represented in the
62
-
<parameter>rows</parameter>. Default is \N ("\\N").
60
+
<parameter>rows</parameter>. Default is <literal>\\N</literal> (<literal>"\\\\N"</literal>).
63
61
</para>
64
62
</listitem>
65
63
</varlistentry>
...
...
@@ -70,11 +68,27 @@
70
68
<refsect1 role="returnvalues">
71
69
&reftitle.returnvalues;
72
70
<para>
73
-
An <type>array</type> with one element for each line of <literal>COPY</literal> data.
74
-
It returns &false; on failure.
71
+
An <type>array</type> with one element for each line of <literal>COPY</literal> data, &return.falseforfailure;.
75
72
</para>
76
73
</refsect1>
77
74

75
+
<refsect1 role="changelog">
76
+
&reftitle.changelog;
77
+
<informaltable>
78
+
<tgroup cols="2">
79
+
<thead>
80
+
<row>
81
+
<entry>&Version;</entry>
82
+
<entry>&Description;</entry>
83
+
</row>
84
+
</thead>
85
+
<tbody>
86
+
&pgsql.changelog.connection-object;
87
+
</tbody>
88
+
</tgroup>
89
+
</informaltable>
90
+
</refsect1>
91
+

78
92
<refsect1 role="examples">
79
93
&reftitle.examples;
80
94
<para>
...
...
@@ -106,7 +120,6 @@
106
120
</para>
107
121
</refsect1>
108
122
</refentry>
109
-

110
123
<!-- Keep this comment at the end of the file
111
124
Local variables:
112
125
mode: sgml
113
126