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