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

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Cynthia Shang <cynthia.shang@crunchydata.com>
Cc: Simon Muller <samullers@gmail.com>, Stephen Frost <sfrost@snowman.net>, Daniel Verite <daniel@manitou-mail.org>, pgsql-hackers@postgresql.org
Date: 2018-10-02T05:06:54Z
Lists: pgsql-hackers
On Fri, Aug 17, 2018 at 01:39:11PM +0900, Michael Paquier wrote:
> The point about the header matching mentioned upthread is quite
> interesting as it could make the proposed feature way more useful, and 
> it has not really been discussed.  As far as I can see this adds more
> sanity checks in NextCopyFromRawFields().  I'd like to think that this
> should be a completely different option, say CHECK_HEADER, as CSV simply
> skips the header in COPY FROM if specified on HEAD.

It has been a couple of weeks since the last review, which has not been
addressed, so I am marking the patch as returned with feedback.
--
Michael

Commits

  1. Fix two issues with HEADER MATCH in COPY

  2. Add header matching mode to COPY FROM

  3. Add HEADER support to COPY text format

  4. Fix handling of redundant options with COPY for "freeze" and "header"