Re: Extend COPY FROM with HEADER <integer> to skip multiple lines

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
Cc: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Extend COPY FROM with HEADER <integer> to skip multiple lines
Date: 2025-06-27 03:22:17
Message-ID: 252cd702-6fbb-4c15-b950-bcc2ef663915@oss.nttdata.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025/06/27 11:55, Shinya Kato wrote:
> I thought about the approach, and had a minor concern about the following inconsistency between the option and its internal implementation:
> - When the option is set to "MATCH", header_line becomes -1.
> - When the option is set to -1, it's an error.

I think this inconsistency is acceptable, since users won't encounter it directly.
Also the value -1 isn't used explicitly, i.e., it's always referenced through a macro
for "match", which keeps the code readable and understandable.

> However, your patch is clear, and it seems we don't need to worry about this concern.
> Your patch looks good to me.

Thanks for reviewing the patch! I've marked it as ready for committer.

Regards,

--
Fujii Masao
NTT DATA Japan Corporation

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-06-27 04:08:35 pg_restore --no-policies should not restore policies' comment
Previous Message shveta malik 2025-06-27 03:20:03 Re: Logical Replication of sequences