Re: Copy cmd error

Поиск
Список
Период
Сортировка
Искать
От
Scott Marlowe
Тема
Re: Copy cmd error
Дата
Msg-id
dcc563d10708271440r469fee38h6aacf1d48ce93f51@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Copy cmd error <qinghuamail-postgresqlfans@yahoo.com>
Re: {Spam} Copy cmd error Dimitri Fontaine <dfontaine@hi-media.com>
Re: Copy cmd error "Scott Marlowe" <scott.marlowe@gmail.com>
On 8/27/07, qinghuamail-postgresqlfans@yahoo.com
 wrote:
> hi,all
>
> I use COPY cmd to import large data to database,but I have a question,
>
> when occured the first error, It always stopped, I need it to be
> continue,and reject the error rows to a file, how to do this?

There are two common ways to do this.

First, import to a temp table then fix up the data there until an
"insert into real_table select * from temp_table" type statement to
import the data.

The second is to swrite some kind of app in bash, perl, php, awd, sed,
C or whatever language you like to put the data into a format that the
database won't choke on.
В списке pgsql-admin по дате отправления
От: Neil Peter Braggio
Дата:
От: Robert Treat
Дата:
FAQ