Re: COPY Transform support - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: COPY Transform support
Date
Msg-id 200804031706.17334.dfontaine@hi-media.com
Whole thread Raw
In response to Re: COPY Transform support  (PFC <lists@peufeu.com>)
Responses Re: COPY Transform support  (PFC <lists@peufeu.com>)
List pgsql-hackers
Le jeudi 03 avril 2008, PFC a écrit :
> CREATE FLATFILE READER mydump (
>         id      INTEGER,
>         date    TEXT,
>         ...
> ) FROM file 'dump.txt'
> (followed by delimiter specification syntax identical to COPY, etc)
> ;
[...]
>         INSERT INTO mytable (id, date, ...) SELECT id, NULLIF( date,
> '0000-00-00'   ), ... FROM mydump WHERE (FKs check and drop the borken
> records);

What do we gain against current way of doing it, which is: COPY loadtable FROM 'dump.txt' WITH ... INSERT INTO
destination_table(...)SELECT ... FROM loadtable;  

--
dim

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: COPY Transform support
Next
From: PFC
Date:
Subject: Re: COPY Transform support