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

Re: Catching exceptions from COPY

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Darren Reed <darrenr+postgres(at)fastmail(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Catching exceptions from COPY
Date: 2008-05-29 01:12:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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: but it's 
not trivial to implement.

It's also possible to do this right now using 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(at)gregsmith(dot)com Baltimore, MD

In response to

pgsql-hackers by date

Next:From: MikeDate: 2008-05-29 01:47:22
Subject: Re: intercepting WAL writes
Previous:From: Thomas H.Date: 2008-05-29 01:05:23
Subject: Re: BUG #4186: set lc_messages does not work

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