Re: Allow COPY's 'text' format to output a header

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, Daniel Verite <daniel(at)manitou-mail(dot)org>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Simon Muller <samullers(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, David Steele <david(at)pgmasters(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow COPY's 'text' format to output a header
Date: 2018-05-15 16:12:41
Message-ID: CAKFQuwZsb2U_QG5sKOGbuWpCWhriOavLs1FVEJeBXZEHL5PiLQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tuesday, May 15, 2018, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>
> AFAICS, Daniel's just reacting to the basic idea of a header line.
> I agree that by itself that's not worth much. However, if we added
> your proposed option to insist that the column names match during COPY
> IN, I think that that could have some value.
>

I'm fine for adding it without the added matching behavior, though turning
the boolean into an enum is appealing.

HEADER { true | false | match }

Though we'd need to accept all variants of Boolean for compatability...

I'm of the opinion that text and csv should be the same excepting their
defaults for some of the options.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2018-05-15 16:27:30 Re: Windows build broken starting at da9b580d89903fee871cf54845ffa2b26bda2e11
Previous Message Tom Lane 2018-05-15 16:06:12 Re: Allow COPY's 'text' format to output a header