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

Re: Import: empty string and expression

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Quan Zongliang <quanzongliang(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Import: empty string and expression
Date: 2009-02-26 10:05:58
Message-ID: 937d27e10902260205t4518ae72q80bb6560cf3bf26c@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
On Thu, Feb 26, 2009 at 9:46 AM, Quan Zongliang <quanzongliang(at)gmail(dot)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

In response to

pgadmin-hackers by date

Next:From: svnDate: 2009-02-26 11:00:23
Subject: SVN Commit by dpage: r7612 - in trunk/pgadmin3/pgadmin: dlg include/schema schema
Previous:From: Dave PageDate: 2009-02-26 10:01:16
Subject: Re: Server Status window work

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