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

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

Andrew Dunstan <andrew(at)dunslane(dot)net> 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 in a form useful for
HEADER MATCH).

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.

- ilmari

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Evgeny Voropaev 2025-06-10 10:16:45 Re: Add 64-bit XIDs into PostgreSQL 15
Previous Message Steven Niu 2025-06-10 09:56:09 Re: [PATCH] Refactor: Extract XLogRecord info