Skip site navigation (1) Skip section navigation (2)

回复: [ADMIN] {Spam} 转发: [ADMIN] Copy cmd error

From: qinghuamail-postgresqlfans(at)yahoo(dot)com
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: 回复: [ADMIN] {Spam} 转发: [ADMIN] Copy cmd error
Date: 2007-08-28 13:40:57
Message-ID: (view raw or whole thread)
Lists: pgsql-admin
thanks ,i read the source of pgloader,and have decided to rewrite my perl  script.

thanks again.

----- 原始邮件 ----
发件人: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
收件人: pgsql-admin(at)postgresql(dot)org; qinghuamail-postgresqlfans(at)yahoo(dot)com
已发送: 2007/8/28(周二), 下午4:03:57
主题: Re: [ADMIN] {Spam} 转发: [ADMIN] Copy cmd error


Le mardi 28 août 2007, qinghuamail-postgresqlfans(at)yahoo(dot)com a écrit :
> hi, after reading the source of pgloader,i have a idea,use perl to create
> the flat file, and, when error,reject the row,seek the next line,continue
> to copy.

That's pretty much what pgloader already does for you: if COPY errors out, 
pgloader split the data in two groups and try to COPY again each of them, 
until the dichotomy isolates the one row causing COPY the error.
Then the given row is appended to the configured reject_data file.

See those options for details:


When issuing COPY PostgreSQL commands, pgloader will not make a single big 
COPY attempt, but copy copy_every lines at a time.
This parameter is optionnal and defaults to 10000.

 In case of errors processing input data, a human readable log per rejected 
input data line is produced into the reject_log file. 

 In case of errors processing input data, the rejected input line is appended 
to the reject_data file.

Maybe this feature should be better highlighted from the DESCRIPTION section 
of the manpage (which is also the website).



pgsql-admin by date

Next:From: John R AllgoodDate: 2007-08-28 14:20:49
Subject: How to monitor resources on Linux.
Previous:From: Tom LaneDate: 2007-08-28 13:35:57
Subject: Re: No restore of BLOB data (permissions?)

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group