Re: Allow COPY's 'text' format to output a header - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Allow COPY's 'text' format to output a header
Date
Msg-id 20180514003707.GB1528@paquier.xyz
Whole thread Raw
In response to Re: Allow COPY's 'text' format to output a header  (David Steele <david@pgmasters.net>)
Responses Re: Allow COPY's 'text' format to output a header  (Simon Muller <samullers@gmail.com>)
Re: Allow COPY's 'text' format to output a header  (Garick Hamlin <ghamlin@isc.upenn.edu>)
List pgsql-hackers
On Sun, May 13, 2018 at 07:01:00PM -0400, David Steele wrote:
> This patch makes sense to me and looks reasonable.

One "potential" problem is if a relation has a full set of column which
allows the input of text-like data: if the header has been added with
COPY TO, and that the user forgets to add again the header option with
COPY FROM, then an extra row will be generated but there is the same
problem with CSV format :)

One comment I have about the patch is that there is no test for
COPY FROM with an output file which has a header.  In this case if
HEADER is true then the file can be loaded.  If HEADER is wrong, an
error should normally be raised because of the format (well, let's
discard the case of the relation with text-only columns).  So the tests
could be extended a bit even for CSV.

> We're in the middle of a feature freeze that will last most of the
> summer, so be sure to enter your patch into the next commitfest so it
> can be considered when the freeze is over.
>
> https://commitfest.postgresql.org/18/

Yes, you will need to be patient a couple of months here.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Postgres 11 release notes
Next
From: Amit Langote
Date:
Subject: Re: postgres_fdw: Oddity in pushing down inherited UPDATE/DELETEjoins to remote servers