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

From: Shinya Kato <shinya11(dot)kato(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: 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-10 05:46:11
Message-ID: CAOzEurSvN3tU+UxsFvy8SqVCnjTcr=vytcitch8TDCDD9cjwLw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 10, 2025 at 2:34 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
> > There are clear differences from the earlier proposal. My sole
> > motivation is to skip multiple headers, and I don't believe a feature
> > for skipping footers is necessary. To be clear, I think it's best to
> > simply extend the current HEADER option.
>
> Sounds ok to me.

Thank you.

> > Regarding the concern about adding ETL-like functionality, this
> > feature is already implemented in other RDBMSs, which is why I believe
> > it is also necessary for PostgreSQL.
> >
> > Honestly, I haven't implemented it yet, so I'm not sure about the
> > performance. However, I don't expect it to be significantly different
> > from the current HEADER option that skips a single line.
>
> So it seems better for you to implement the patch at first and then
> check the performance overhead etc if necessary.

Thank you for your advice. I will create a patch.

--
Best regards,
Shinya Kato
NTT OSS Center

On Tue, Jun 10, 2025 at 2:34 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
>
>
>
> On 2025/06/10 9:43, Shinya Kato wrote:
> >>> However, a similar proposal was made earlier [1], and seemingly
> >>> some hackers weren't in favor of it. It's probably worth reading
> >>> that thread to understand the previous concerns.
> >>>
> >>> [1] https://postgr.es/m/CALAY4q8nGSXp0P5uf56vn-mD7reWqZP5k6PS1CGUm26X4FsYJA@mail.gmail.com
> >>
> >> Oh, I missed it. I will check it soon.
> >
> > I read it.
> >
> > There are clear differences from the earlier proposal. My sole
> > motivation is to skip multiple headers, and I don't believe a feature
> > for skipping footers is necessary. To be clear, I think it's best to
> > simply extend the current HEADER option.
>
> Sounds ok to me.
>
>
> > Regarding the concern about adding ETL-like functionality, this
> > feature is already implemented in other RDBMSs, which is why I believe
> > it is also necessary for PostgreSQL.
> >
> > Honestly, I haven't implemented it yet, so I'm not sure about the
> > performance. However, I don't expect it to be significantly different
> > from the current HEADER option that skips a single line.
>
> So it seems better for you to implement the patch at first and then
> check the performance overhead etc if necessary.
>
> Regards,
>
> --
> Fujii Masao
> NTT DATA Japan Corporation
>

--
Best regards,
Shinya Kato
NTT OSS Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-06-10 05:50:12 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Previous Message Fujii Masao 2025-06-10 05:34:32 Re: Extend COPY FROM with HEADER <integer> to skip multiple lines