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

From: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
To: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Extend COPY FROM with HEADER <integer> to skip multiple lines
Date: 2025-06-11 10:21:56
Message-ID: 87y0tyvarf.fsf@wibble.ilmari.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> writes:

> On Tue, Jun 10, 2025 at 7:05 PM Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>
> wrote:
>
>> Although not useful for the above format, and not intended to derail or
>> bloat the proposal in this thread, would it be useful to have a mode
>> that combines skip and match? I.e. skip N lines, then check the fields
>> in the one after that against the target columns.
>
> I think it would be useful, but the target columns are not always at the
> bottom of the header. For example, the target columns could be on the first
> line, with explanations or sub-columns on the lines that follow.
>
> Considering this, the patch would become too complicated, so I'd like to
> keep this out of scope. What do you think?

Yeah, that's a valid point, and as I said I don't want to bloat or
derail this proposal, so keeping it simple is fine.

- ilmari

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2025-06-11 10:27:21 Re: Question on error code selection in conflict detection
Previous Message Ajin Cherian 2025-06-11 10:15:42 Re: Fix slot synchronization with two_phase decoding enabled