diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-04-30 19:49:06 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-04-30 19:49:06 +0000 |
commit | 854b5eb510f09ce55a6abd8ac3caf72b2eb36a5c (patch) | |
tree | eedabf86f8e889b47f904369fcec3e8282dc17ca | |
parent | b1bc2f042523e1d192a924484d6a83b7cb6d7465 (diff) | |
download | postgresql-854b5eb510f09ce55a6abd8ac3caf72b2eb36a5c.tar.gz postgresql-854b5eb510f09ce55a6abd8ac3caf72b2eb36a5c.zip |
Improve COPY documentation to clarify that it doesn't copy data to or from
child tables. Per gripe from Jaime Casanova.
-rw-r--r-- | doc/src/sgml/ref/copy.sgml | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 8f8f48dd646..ac2f0dadc20 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.97 2010/04/23 23:21:43 rhaas Exp $ +$PostgreSQL: pgsql/doc/src/sgml/ref/copy.sgml,v 1.98 2010/04/30 19:49:06 tgl Exp $ PostgreSQL documentation --> @@ -309,6 +309,16 @@ COPY <replaceable class="parameter">count</replaceable> </para> <para> + <command>COPY</command> only deals with the specific table named; + it does not copy data to or from child tables. Thus for example + <literal>COPY <replaceable class="parameter">table</> TO</literal> + shows the same data as <literal>SELECT * FROM ONLY <replaceable + class="parameter">table</></literal>. But <literal>COPY + (SELECT * FROM <replaceable class="parameter">table</>) TO ...</literal> + can be used to dump all of the data in an inheritance hierarchy. + </para> + + <para> You must have select privilege on the table whose values are read by <command>COPY TO</command>, and insert privilege on the table into which values |