Re: COPY FROM WHEN condition
Christoph Moench-Tegeder <cmt@burggraben.net>
From: Christoph Moench-Tegeder <cmt@burggraben.net>
To: pgsql-hackers@lists.postgresql.org
Date: 2018-10-11T08:59:25Z
Lists: pgsql-hackers
## Surafel Temesgen (surafel3000@gmail.com): > Currently we can not moves data from a file to a table based on some > condition on a certain column You can: COPY ( query ) TO 'filename'; There's even an example in the documentation: https://www.postgresql.org/docs/10/static/sql-copy.html "To copy into a file just the countries whose names start with 'A': COPY (SELECT * FROM country WHERE country_name LIKE 'A%') TO '/usr1/proj/bray/sql/a_list_countries.copy';" Regards, Christoph -- Spare Space.
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