Re: START/END line number for COPY FROM

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Surafel Temesgen <surafel3000(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: START/END line number for COPY FROM
Date: 2019-01-05 10:09:44
Message-ID: CAKJS1f-vNDrtdWYG-tSjK=UzYMCJH5_Si9XtNrudy5VHqh+96Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 21 Dec 2018 at 02:02, Surafel Temesgen <surafel3000(at)gmail(dot)com> wrote:
> Currently we can skip header line on COPY FROM but having the ability to skip and stop copying at any line can use to divide long copy operation and enable to copy a subset of the file and skipping footer. Attach is a patch for it

I'm struggling a bit to see the sense in this. If you really want to
improve the performance of a long copy, then I think it makes more
sense to have performed the backup in multiple pieces in the first
place. Having the database read the input stream and ignore the first
N lines sounds like a bit of a waste of effort, and effort that
wouldn't be required if the COPY TO had been done in multiple pieces.

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nguyễn Trần Quốc Vinh 2019-01-05 10:53:07 Re: Feature: triggers on materialized views
Previous Message Tatsuo Ishii 2019-01-05 09:35:32 btree.sgml typo?