| From: | Rémi Lapeyre <remi(dot)lapeyre(at)lenstra(dot)fr> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org, peter(dot)eisentraut(at)2ndquadrant(dot)com |
| Cc: | Rémi Lapeyre <remi(dot)lapeyre(at)lenstra(dot)fr> |
| Subject: | [PATCH v3 1/2] Add header support to "COPY TO" text format |
| Date: | 2020-07-17 14:54:09 |
| Message-ID: | 20200717145410.5158-2-remi.lapeyre@lenstra.fr |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
CSV format supports the HEADER option to output a header in the output,
it is convenient when other programs need to consume the output. This
patch adds the same option to the default text format.
Discussion: https://www.postgresql.org/message-id/flat/CAF1-J-0PtCWMeLtswwGV2M70U26n4g33gpe1rcKQqe6wVQDrFA(at)mail(dot)gmail(dot)com
---
contrib/file_fdw/input/file_fdw.source | 1 -
contrib/file_fdw/output/file_fdw.source | 4 +---
doc/src/sgml/ref/copy.sgml | 3 ++-
src/backend/commands/copy.c | 11 +++++++----
src/test/regress/input/copy.source | 12 ++++++++++++
src/test/regress/output/copy.source | 8 ++++++++
6 files changed, 30 insertions(+), 9 deletions(-)
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-Add-header-support-to-COPY-TO-text-format.patch | text/x-patch | 5.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Rémi Lapeyre | 2020-07-17 14:54:10 | [PATCH v3 2/2] Add header matching mode to "COPY FROM" |
| Previous Message | Rémi Lapeyre | 2020-07-17 14:54:08 | Add header support to text format and matching feature |