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

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to