Re: Extend COPY FROM with HEADER to skip multiple lines - Mailing list pgsql-hackers

From Dagfinn Ilmari Mannsåker
Subject Re: Extend COPY FROM with HEADER to skip multiple lines
Date
Msg-id 875xh3x66t.fsf@wibble.ilmari.org
Whole thread Raw
In response to Re: Extend COPY FROM with HEADER to skip multiple lines  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.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



pgsql-hackers by date:

Previous
From: Steven Niu
Date:
Subject: Re: [PATCH] Refactor: Extract XLogRecord info
Next
From: Evgeny Voropaev
Date:
Subject: Re: Add 64-bit XIDs into PostgreSQL 15