Re: BUG #15385: Copy from using CSV ignores the header

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: dab1961uk(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15385: Copy from using CSV ignores the header
Date: 2018-09-14 17:02:02
Message-ID: CAKFQuwYPtoPkixqS-cFtsi6sqQa1d1hrVe17QH3sAm3E_3kTdQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Sep 14, 2018 at 9:49 AM, PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:

> The following bug has been logged on the website:
>
> Bug reference: 15385
> Logged by: David Betterton
> Email address: dab1961uk(at)gmail(dot)com
> PostgreSQL version: 9.5.14
> Operating system: Linux
> Description:
>
> This is stated in the documentation,

Which makes it "not a bug", -general would be the appropriate list to use
here.

> but it's totally ludicrous,

not its not

> it means
> that every csv has to conform to the order of the database columns, or the
> caller has to explicitly set the column order - which is in the CSV file
>

And if one doesn't rely upon column position and instead wants to key off
of names then you have to ensure the table and csv files names are in
agreement.

History suggests the cost/benefit of change in this area is pretty low.

David J.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message 'Bruce Momjian' 2018-09-14 19:49:17 Re: BUG #15373: null / utf-8
Previous Message PG Bug reporting form 2018-09-14 16:49:26 BUG #15385: Copy from using CSV ignores the header