Re: Extend COPY FROM with HEADER to skip multiple lines

2025-07-02 Thread Shinya Kato
On Thu, Jul 3, 2025 at 3:32 PM Fujii Masao wrote: > > > > On 2025/07/03 11:08, Shinya Kato wrote: > > On Wed, Jul 2, 2025 at 4:48 PM Fujii Masao > > wrote: > > > Regarding the documentation, how about explicitly stating that when > MATCH is specified, only > the first line is ski

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-07-02 Thread Fujii Masao
On 2025/07/03 11:08, Shinya Kato wrote: On Wed, Jul 2, 2025 at 4:48 PM Fujii Masao wrote: Regarding the documentation, how about explicitly stating that when MATCH is specified, only the first line is skipped? While this may seem obvious, it’s worth clarifying, as the semantics of the HEA

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-07-02 Thread Shinya Kato
On Wed, Jul 2, 2025 at 4:48 PM Fujii Masao wrote: > >> Regarding the documentation, how about explicitly stating that when MATCH > >> is specified, only > >> the first line is skipped? While this may seem obvious, it’s worth > >> clarifying, as the semantics > >> of the HEADER option have becom

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-07-02 Thread Fujii Masao
On 2025/07/02 14:39, Shinya Kato wrote: On Mon, Jun 30, 2025 at 4:24 PM Yugo Nagata wrote: I have a few minor comment on the patch. + if (ival < 0) + ereport(ERROR, + (errcode(E

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-07-01 Thread Shinya Kato
On Mon, Jun 30, 2025 at 4:24 PM Yugo Nagata wrote: > > > > > I have a few minor comment on the patch. > > > > > > + if (ival < 0) > > > + ereport(ERROR, > > > + > > > (errcode(ERRCODE_INV

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-30 Thread Yugo Nagata
On Sat, 28 Jun 2025 00:33:45 +0900 Fujii Masao wrote: > > > On 2025/06/27 13:09, Yugo Nagata wrote: > > On Fri, 27 Jun 2025 12:22:17 +0900 > > Fujii Masao wrote: > > > >>> However, your patch is clear, and it seems we don't need to worry about > >>> this concern. > >>> Your patch looks good

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-27 Thread Fujii Masao
On 2025/06/27 13:09, Yugo Nagata wrote: On Fri, 27 Jun 2025 12:22:17 +0900 Fujii Masao wrote: 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. I have

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Yugo Nagata
On Fri, 27 Jun 2025 12:22:17 +0900 Fujii Masao wrote: > > 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. I have a few minor comment on the patc

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Fujii Masao
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 t

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Shinya Kato
On Fri, Jun 27, 2025 at 12:03 AM Fujii Masao wrote: > > > On 2025/06/26 19:12, Shinya Kato wrote: > > On Thu, Jun 26, 2025 at 4:36 PM Fujii Masao > wrote: > > > > On 2025/06/26 14:35, Shinya Kato wrote: > > > > > > > > So it seems better for you

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Fujii Masao
On 2025/06/26 19:12, Shinya Kato wrote: On Thu, Jun 26, 2025 at 4:36 PM Fujii Masao mailto:masao.fu...@oss.nttdata.com>> wrote: On 2025/06/26 14:35, Shinya Kato wrote: > >  > > So it seems better for you to implement the patch at first and then >  > > check the performance o

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Shinya Kato
On Thu, Jun 26, 2025 at 4:36 PM Fujii Masao wrote: > On 2025/06/26 14:35, Shinya Kato wrote: > > > > > > 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. >

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-26 Thread Fujii Masao
On 2025/06/26 14:35, Shinya Kato wrote: > > 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. I created a patch. Thanks for the patch! As you can see from the

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-25 Thread Shinya Kato
> > 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. I created a patch. As you can see from the patch, I believe the performance impact is negligible. The only changes wer

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-11 Thread Dagfinn Ilmari Mannsåker
Shinya Kato writes: > On Tue, Jun 10, 2025 at 7:05 PM Dagfinn Ilmari Mannsåker > 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 c

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-10 Thread Shinya Kato
On Tue, Jun 10, 2025 at 7:05 PM Dagfinn Ilmari Mannsåker wrote: > Andrew Dunstan writes: > > > OTOH I'm a bit curious to know what software produces multi-line CSV > > headers. > > AWS CloudFront access logs are stored in S3 as TSV files (one per hour > per CF node) with a two-line header commen

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-10 Thread Dagfinn Ilmari Mannsåker
Andrew Dunstan writes: > OTOH I'm a bit curious to know what software produces multi-line CSV > headers. AWS CloudFront access logs are stored in S3 as TSV files (one per hour per CF node) with a two-line header comment where the first line is the version and the second lists the fields (but not

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Fujii Masao
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-md7rewqzp5k6ps1cgum26x4fs...

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Shinya Kato
On Tue, Jun 10, 2025 at 2:34 PM Fujii Masao 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 HEA

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Shinya Kato
> > 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-md7rewqzp5k6ps1cgum26x4fs...@mail.gmail.com > > O

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Andrew Dunstan
On 2025-06-09 Mo 4:27 AM, Fujii Masao wrote: On 2025/06/09 16:10, Shinya Kato wrote: Hi hackers, I'd like to propose a new feature for the COPY FROM command to allow skipping multiple header lines when loading data. This enhancement would enable files with multi-line headers to be loaded wi

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Shinya Kato
2025年6月9日(月) 17:27 Fujii Masao : > I generally like the idea. Thanks. > 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/calay4q8ngsx

Re: Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Fujii Masao
On 2025/06/09 16:10, Shinya Kato wrote: Hi hackers, I'd like to propose a new feature for the COPY FROM command to allow skipping multiple header lines when loading data. This enhancement would enable files with multi-line headers to be loaded without any preprocessing, which would significan

Extend COPY FROM with HEADER to skip multiple lines

2025-06-09 Thread Shinya Kato
Hi hackers, I'd like to propose a new feature for the COPY FROM command to allow skipping multiple header lines when loading data. This enhancement would enable files with multi-line headers to be loaded without any preprocessing, which would significantly improve usability. In real-world scenari