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
In response to
Responses
pgsql-hackers by date
| Next: | From: PFC | Date: 2008-04-03 15:15:35 |
| Subject: Re: COPY Transform support |
| Previous: | From: Tom Lane | Date: 2008-04-03 15:00:26 |
| Subject: Re: COPY Transform support |