git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1a77ea0)
docs: clarify handling of column lists in COPY TO/FROM
2019年12月21日 17:44:38 +0000 (12:44 -0500)
2019年12月21日 17:44:38 +0000 (12:44 -0500)
Previously it was unclear how COPY FROM handled cases where not all
columns were specified, or if the order didn't match.

Reported-by: pavlo.golub@gmail.com
Discussion: https://postgr.es/m/157487729344.7213.14245726713444755296@wrigleys.postgresql.org

Backpatch-through: 9.4


diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml
index e2663063f17ef8c05b68775518557b89e85e0f2c..bdc421e23835aa3743ec434125a4a9f517162c58 100644 (file)
--- a/doc/src/sgml/ref/copy.sgml
+++ b/doc/src/sgml/ref/copy.sgml
@@ -61,11 +61,11 @@ COPY { <replaceable class="parameter">table_name</replaceable> [ ( <replaceable
</para>
<para>
- If a list of columns is specified, <command>COPY</command> will
- only copy the data in the specified columns to or from the file.
- If there are any columns in the table that are not in the column list,
- <command>COPY FROM</command> will insert the default values for
- those columns.
+ If a column list is specified, <command>COPY TO</command> copies only
+ the data in the specified columns to the file. For <command>COPY
+ FROM</command>, each field in the file is inserted, in order, into the
+ specified column. Table columns not specified in the <command>COPY
+ FROM</command> column list will receive their default values.
</para>
<para>
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /