Allow COPY's 'text' format to output a header
Simon Muller <samullers@gmail.com>
From: Simon Muller <samullers@gmail.com>
To: pgsql-hackers@postgresql.org
Date: 2018-05-13T22:18:38Z
Lists: pgsql-hackers
Attachments
- 0001-Allow-COPY-s-text-format-to-output-a-header.patch (application/octet-stream) patch 0001
This patch adds the capability to use the HEADER feature with the "text" format of the COPY command. The patch includes the related update to documentation and an additional regression test for this feature. Currently you can only add a header line (which lists the column names) when exporting with COPY to the CSV format, but I much prefer using the default "text" format. This feature is also currently listed on the to-do list (https://wiki.postgresql.org/wiki/Todo#COPY) where it seems to have been requested some years ago. Hopefully I've done everything correctly and the patch is acceptable enough to be considered for application. Simon Muller
Commits
-
Fix two issues with HEADER MATCH in COPY
- ca7a0d1d3682 15.0 landed
-
Add header matching mode to COPY FROM
- 072132f04e55 15.0 landed
-
Add HEADER support to COPY text format
- 43f33dc018a4 15.0 landed
-
Fix handling of redundant options with COPY for "freeze" and "header"
- 10c5291cc2c6 14.0 landed