public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Tom Lane <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: Pavlo Golub <[email protected]>
Cc: Laurenz Albe <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: COPY manual is ambiguous about column list
Date: Thu, 19 Dec 2019 22:33:48 -0700
Message-ID: <CAKFQuwYHOpSfBcyX33Avt3ncrDsu6pxb-LXTm0SA+-nGWVSbhQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<CAMtUEpBmq3Mefkyh=RmkC4Fuqq+YtbUrr_nHnzxUwEbwm+CPfg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<CAKFQuwaxE-m5VKQkOapv+3kMnP2Q9hEb0NbGeBfqkQuX3UmVgQ@mail.gmail.com>
	<[email protected]>

On Thursday, December 19, 2019, Tom Lane <[email protected]> wrote:

> "David G. Johnston" <[email protected]> writes:
> > Seems better to simply talk about each form independently:
>
> > If a list of columns is specified, <command>COPY TO</command> will only
> > copy the data in the specified columns to the file.  <command>COPY
> > FROM</command> will, by position (i.e., the number of columns listed must
> > match the number of columns in the file), match each file column to the
> > named column in the table.  Any additional columns present in the table
> > will receive their default value.
>
> +1 for separating it like that, but your middle sentence reads awkwardly
> to me.  How about something like
>
>   <command>COPY FROM</command> will match each listed column in the table
>   to a file column by position (so the number of columns listed must match
>   the number of columns in the file).
>
>
>

+1

David J.


view thread (16+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: COPY manual is ambiguous about column list
  In-Reply-To: <CAKFQuwYHOpSfBcyX33Avt3ncrDsu6pxb-LXTm0SA+-nGWVSbhQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox