Re: COPY FROM WHEN condition
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Surafel Temesgen <surafel3000@gmail.com>, Adam Berlin <berlin.ab@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2018-12-04T09:44:18Z
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
Commits
-
Remove unused struct member, enforce multi_insert callback presence.
- 57a7a3adfe4e 12.0 landed
-
Separate per-batch and per-tuple memory contexts in COPY
- 36a1281f86c0 12.0 landed
-
Fix handling of volatile expressions in COPY FROM ... WHERE
- 4a8283d0ec5a 12.0 landed
-
Allow COPY FROM to filter data using WHERE conditions
- 31f3817402da 12.0 landed
-
Remove obsolete netbsd dynloader code
- b68ff3ea672c 12.0 cited