Re: Take skip header out of a loop in COPY FROM

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Surafel Temesgen <surafel3000(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Take skip header out of a loop in COPY FROM
Date: 2019-08-22 08:48:31
Message-ID: cbe02650-f502-1743-72e8-a93cc51313fd@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22/08/2019 11:31, Surafel Temesgen wrote:
> Hello,
>
> Even if skipping header is done only once its checked and skipped in a
> loop. If I don’t miss something it can be done out side a loop like
> attached patch

You may be on to something, but if we move it to CopyFrom(), as in your
patch, then it won't get executed e.g. from the calls in file_fdw.
file_fdw calls BeginCopyFrom(), followed by NextCopyFrom(); it doesn't
use CopyFrom().

- Heikki

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-08-22 08:56:19 Re: Make SQL/JSON error code names match SQL standard
Previous Message Surafel Temesgen 2019-08-22 08:31:14 Take skip header out of a loop in COPY FROM