public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrew Dunstan <[email protected]>
To: Neil Conway <[email protected]>
Cc: Hannu Krosing <[email protected]>
Cc: Josh Berkus <[email protected]>
Cc: [email protected]
Cc: Simon Riggs <[email protected]>
Subject: Re: VLDB Features
Date: Fri, 14 Dec 2007 14:39:49 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<1197636530.7974.16.camel@hannu-laptop>
	<[email protected]>



Neil Conway wrote:
> On Fri, 2007-12-14 at 14:48 +0200, Hannu Krosing wrote:
>   
>> How did you do it ?
>>
>> Did you enchance COPY command or was it something completely new ?
>>     
>
> By modifying COPY: COPY IGNORE ERRORS or some such would instruct COPY
> to drop (and log) rows that contain malformed data. That is, rows with
> too many or too few columns, rows that result in constraint violations,
> and rows containing columns where the data type's input function raises
> an error. The last case is the only thing that would be a bit tricky to
> implement, I think: you could use PG_TRY() around the InputFunctionCall,
> but I guess you'd need a subtransaction to ensure that you reset your
> state correctly after catching an error.
>
>
>   

Ideally I think you would put the failing input line in another table, 
or maybe another file. If a table, it would probably have to be as bytea.

cheers

andrew



view thread (39+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: VLDB Features
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox