Re: COPY FROM WHEN condition

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: Surafel Temesgen <surafel3000(at)gmail(dot)com>, Adam Berlin <berlin(dot)ab(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: COPY FROM WHEN condition
Date: 2018-12-04 09:44:18
Message-ID: 20181204094418.wpr6mxrtsuxb5mlq@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

After reading this thread, I think I like WHERE better than FILTER.
Tally:

WHERE: Adam Berlin, Lim Myungkyu, Dean Rasheed, yours truly
FILTER: Tomas Vondra, Surafel Temesgen

Couldn't find others expressing an opinion in this regard.

On 2018-Nov-30, Tomas Vondra wrote:

> I think it should be enough just to switch to CIM_SINGLE and increment the
> command counter after each inserted row.

Do we apply command counter increment per row with some other COPY
option? Per-row CCI makes me a bit uncomfortable because with you'd get
in trouble with a large copy. I think it's particularly nasty here,
precisely because you may want to filter out some rows of a very large
file, and the CCI may prevent that from working.
I'm not convinced by the example case of reading how many tuples you've
imported so far in the WHERE/WHEN/FILTER clause each time (that'd become
incrementally slower as it progresses).

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2018-12-04 10:06:16 Re: COPY FROM WHEN condition
Previous Message Dilip Kumar 2018-12-04 09:43:55 Re: Undo worker and transaction rollback