Unix Technical Forum

=?gb2312?B?u9i4tKO6IFtBRE1JTl0ge1NwYW19INeqt6KjuiB bQURNSU5dIENvcHkgY21k?==?gb2312?B?IGVycm9y?=

This is a discussion on =?gb2312?B?u9i4tKO6IFtBRE1JTl0ge1NwYW19INeqt6KjuiB bQURNSU5dIENvcHkgY21k?==?gb2312?B?IGVycm9y?= within the pgsql Admins forums, part of the PostgreSQL category; --> thanks ,i read the source of pgloader,and have decided to rewrite my perl script. thanks again. ----- 原始邮件 ---- ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 08:11 AM
qinghuamail-postgresqlfans@yahoo.com
 
Posts: n/a
Default =?gb2312?B?u9i4tKO6IFtBRE1JTl0ge1NwYW19INeqt6KjuiB bQURNSU5dIENvcHkgY21k?==?gb2312?B?IGVycm9y?=

thanks ,i read the source of pgloader,and have decided to rewrite my perl script.



thanks again.

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

Hi,

Le mardi 28 août 2007, qinghuamail-postgresqlfans@yahoo.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:
http://pgloader.projects.postgresql.org/

copy_every

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.

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

reject_data
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 fromthe DESCRIPTION section
of the manpage (which is also the website).

Regards,
--
dim







__________________________________________________ _________
雅虎邮箱,以安全著称,是值得信赖 邮箱专家!
http://mail.yahoo.com.cn/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:44 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com