diff options
author | Bruce Momjian | 2019-12-21 17:44:38 +0000 |
---|---|---|
committer | Bruce Momjian | 2019-12-21 17:44:38 +0000 |
commit | 530b5d53f67262c5e092f8b82aa8e34f54e7e68f (patch) | |
tree | aec71cd9fdd29aa4d93e32427bd73b6c80dbf781 | |
parent | 875c7d70def61a725ed94d25859a7d806dd6e747 (diff) |
docs: clarify handling of column lists in COPY TO/FROM
Previously it was unclear how COPY FROM handled cases where not all
columns were specified, or if the order didn't match.
Reported-by: [email protected]
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 9.4
-rw-r--r-- | doc/src/sgml/ref/copy.sgml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 7ca663f925..c75e25c632 100644 --- 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> |