Re: Import: empty string and expression - Mailing list pgadmin-hackers

From Dave Page
Subject Re: Import: empty string and expression
Date
Msg-id 937d27e10902260205t4518ae72q80bb6560cf3bf26c@mail.gmail.com
Whole thread Raw
In response to Re: Import: empty string and expression  (Quan Zongliang <quanzongliang@gmail.com>)
List pgadmin-hackers
On Thu, Feb 26, 2009 at 9:46 AM, Quan Zongliang <quanzongliang@gmail.com> wrote:
>> Have a set  of radio buttons and a textbox perhaps:
>> NULL AS:  NULL  O   empty string O    constant   O    [                ]
>> NULL AS:  NULL  O    constant   O    [                ]
> My plan is the user can set this option for every column.
> Because different column has different set(nullable or not) and different type.
>
>> I wouldn't bother with ERROR for any type - let the server detect
>> errors and reject data accordingly.
> With COPY command, it stops operation at the first error.
> Maybe the user don't want this. Especially when they want to import a huge size file.

Hmm, OK.

The common way to handle errors in COPY style imports btw, is to batch
the imports, and when one batch fails, split it in two and try again.
Keep dividing it down until the error lines are found, and everything
else is imported. Of course, if you have lots of errors that can
pretty inefficient.


--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

pgadmin-hackers by date:

Previous
From: Quan Zongliang
Date:
Subject: Re: Import: empty string and expression
Next
From: Dave Page
Date:
Subject: Re: Server Status window work