Unix Technical Forum

Catching exceptions from COPY

This is a discussion on Catching exceptions from COPY within the pgsql Hackers forums, part of the PostgreSQL category; --> Is it feasible to add the ability to catch exceptions from COPY? Darren -- Sent via pgsql-hackers mailing list ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-29-2008, 09:43 AM
Darren Reed
 
Posts: n/a
Default Catching exceptions from COPY

Is it feasible to add the ability to catch exceptions from COPY?

Darren


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-29-2008, 09:43 AM
Greg Smith
 
Posts: n/a
Default Re: Catching exceptions from COPY

On Wed, 28 May 2008, Darren Reed wrote:

> Is it feasible to add the ability to catch exceptions from COPY?


Depends on what you consider feasible. There's a start to a plan for that
on the TODO list: http://www.postgresql.org/docs/faqs.TODO.html but it's
not trivial to implement.

It's also possible to do this right now using pgloader:
http://pgfoundry.org/projects/pgloader/ That requires some setup and
there's overhead to passing through that loading layer.

A third possibility is to write a short script specifically aimed at your
copy need that breaks your input files into smaller chunks and loads them,
kicking back the ones that don't load, or breaking them into even smaller
chunks until you've found the problem line or lines.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

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 09:58 PM.


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