pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedCopy cmd error
2+ messages / 2 participants
[nested] [flat]
* Copy cmd error
@ 2007-08-27 08:18 qinghuamail-postgresqlfans@yahoo.com
2007-08-27 21:40 ` Re: Copy cmd error Scott Marlowe <scott.marlowe@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: qinghuamail-postgresqlfans@yahoo.com @ 2007-08-27 08:18 UTC (permalink / raw)
To: pgsql-admin
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?
thanks!
---------------------------------
雅虎邮箱,以安全著称,是值得信赖的邮箱专家!
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Copy cmd error
2007-08-27 08:18 Copy cmd error qinghuamail-postgresqlfans@yahoo.com
@ 2007-08-27 21:40 ` Scott Marlowe <scott.marlowe@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Scott Marlowe @ 2007-08-27 21:40 UTC (permalink / raw)
To: qinghuamail-postgresqlfans@yahoo.com; +Cc: pgsql-admin
On 8/27/07, qinghuamail-postgresqlfans@yahoo.com
<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.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-08-27 21:40 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-08-27 08:18 Copy cmd error qinghuamail-postgresqlfans@yahoo.com
2007-08-27 21:40 ` Scott Marlowe <scott.marlowe@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox