summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2006-03-03 19:54:10 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2006-03-03 19:54:10 +0000
commit023570f5e3a1695cb3e906079e6b87ac3720d607 (patch)
treea3de2a3404626713b95a541a8bd13e9d818cd178 /doc/src
parent4e086f7cb516b57624eb4b135c2539b827fb191e (diff)
Make the COPY command return a command tag that includes the number of
rows copied. Backend side of Volkan Yazici's recent patch, with corrections and documentation.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/protocol.sgml15
-rw-r--r--doc/src/sgml/ref/copy.sgml16
2 files changed, 27 insertions, 4 deletions
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 689460ed92f..73eef92fff1 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/protocol.sgml,v 1.63 2006/01/18 06:49:25 neilc Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/protocol.sgml,v 1.64 2006/03/03 19:54:09 tgl Exp $ -->
<chapter id="protocol">
<title>Frontend/Backend Protocol</title>
@@ -2069,7 +2069,7 @@ CommandComplete (B)
String
</term>
<listitem>
-<para>
+ <para>
The command tag. This is usually a single
word that identifies which SQL command was completed.
</para>
@@ -2109,7 +2109,16 @@ CommandComplete (B)
<literal>FETCH <replaceable>rows</replaceable></literal> where
<replaceable>rows</replaceable> is the number of rows that
have been retrieved from the cursor.
-</para>
+ </para>
+
+ <para>
+ For a <command>COPY</command> command, the tag is
+ <literal>COPY <replaceable>rows</replaceable></literal> where
+ <replaceable>rows</replaceable> is the number of rows copied.
+ (Note: the row count appears only in
+ <productname>PostgreSQL</productname> 8.2 and later.)
+ </para>
+
</listitem>
</varlistentry>
</variablelist>
diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml
index bf6b1f1c3fc..e748cc2e8e9 100644
--- a/doc/src/sgml/ref/copy.sgml
+++ b/doc/src/sgml/ref/copy.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.72 2005/12/28 14:38:32 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.73 2006/03/03 19:54:10 tgl Exp $
PostgreSQL documentation
-->
@@ -254,6 +254,20 @@ COPY <replaceable class="parameter">tablename</replaceable> [ ( <replaceable cla
</refsect1>
<refsect1>
+ <title>Outputs</title>
+
+ <para>
+ On successful completion, a <command>COPY</> command returns a command
+ tag of the form
+<screen>
+COPY <replaceable class="parameter">count</replaceable>
+</screen>
+ The <replaceable class="parameter">count</replaceable> is the number
+ of rows inserted into or copied from the table.
+ </para>
+ </refsect1>
+
+ <refsect1>
<title>Notes</title>
<para>