| From: | Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com> |
|---|---|
| To: | Mariyan Clement S <softclement(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: PostgreSQL 19 Beta 2: COPY HEADER N exceeds file length - test observation |
| Date: | 2026-08-14 10:46:36 |
| Message-ID: | CAEze2Wj66FbOMT7sQ_YcFjC9Jrs5vtPEadZ8BdUmV2z+TP=BEw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, 13 Aug 2026 at 21:12, Mariyan Clement S <softclement(at)gmail(dot)com> wrote:
>
> Hi PostgreSQL community,
>
> I have been testing the new integer form of the COPY FROM HEADER option in PostgreSQL 19 Beta 2 and wanted to share an edge-case observation for confirmation.
>
> I tested a CSV file containing only 5 lines:
>
> 3 metadata lines
So, it's not really a CSV file, or at least not compliant with the
relevant RFC 4180?
> Could someone please confirm whether this is the expected/intended behavior for HEADER ?
The docs are clear: "HEADER [...] On input, [i]f set to a non-negative
integer, that number of lines are discarded."
Unless you suggest we raise an error when the input file doesn't
contain at least as many lines as indicated by the user's integer
input to HEADER, the behaviour of ignoring lines indicated by the user
to be headers is fully expected.
Kind regards,
Matthias van de Meent
Databricks (https://www.databricks.com)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mariyan Clement S | 2026-08-14 11:23:54 | Re: PostgreSQL 19 Beta 2: COPY HEADER N exceeds file length - test observation |
| Previous Message | Álvaro Herrera | 2026-08-14 10:28:13 | Re: Reduce padding in WALOpenSegment and XLogReaderState |