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: Garick Hamlin <ghamlin(at)isc(dot)upenn(dot)edu>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, David Steele <david(at)pgmasters(dot)net>, Simon Muller <samullers(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow COPY's 'text' format to output a header
Date: 2018-05-14 18:55:45
Message-ID: CAKFQuwbO=UZ6GhQbSdOmciKezU-3OsmjROjiq3mpiqmjsr6B-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 14, 2018 at 11:44 AM, Garick Hamlin <ghamlin(at)isc(dot)upenn(dot)edu>
wrote:

> I wonder if there was a way to let COPY FROM detect or ignore headers
>
as appropriate and rather than cause silently result in headers being
> added as data.
>

​ ​Not reliably​

> Maybe a blank line after the header line could prevent this confusion
>

​No​

+1 for allowing HEADER with FORMAT text. It doesn't interfere with COPY
and even if I were to agree that CSV format is the better one this seems
like an unnecessary area to impose preferences. If TSV with Header meets
someone's need providing a minimal (and consistent with expectations)
syntax to accomplish that goal seems reasonable, as does the patch.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2018-05-14 20:04:58 Re: Postgres 11 release notes
Previous Message Robert Haas 2018-05-14 18:45:01 Re: explain (verbose off, normalized) vs query planid