COPY FROM WHEN condition
Surafel Temsgen <surafel3000@gmail.com>
From: Surafel Temesgen <surafel3000@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-10-11T08:54:55Z
Lists: pgsql-hackers
Attachments
- copy_from_when_con_v1.patch (text/x-patch) patch v1
Hello,
Currently we can not moves data from a file to a table based on some
condition on a certain column but I think there are many use case for it
that worth supporting. Attache is a patch for escaping a row that does not
satisfy WHEN condition from inserting into a table and its work on the top
of commit b68ff3ea672c06
and the syntax is
COPY table_name [ ( column_name [, ...] ) ]
FROM { 'filename' | PROGRAM 'command' | STDIN }
[ [ WITH ] ( option [, ...] ) ]
[ WHEN condition ]
comment ?
Regards
Surafel
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