COPY FROM WHEN condition - Mailing list pgsql-hackers

From Surafel Temesgen
Subject COPY FROM WHEN condition
Date
Msg-id CALAY4q_DdpWDuB5-Zyi-oTtO2uSk8pmy+dupiRe3AvAc++1imA@mail.gmail.com
Whole thread Raw
Responses Re: COPY FROM WHEN condition
Re: COPY FROM WHEN condition
List pgsql-hackers

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

Attachment

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: [HACKERS] WAL logging problem in 9.4.3?
Next
From: Christoph Moench-Tegeder
Date:
Subject: Re: COPY FROM WHEN condition