Re: Why ContinueUpdateOnError is not implemented in npgsql

From: Richard Huxton <dev(at)archonet(dot)com>
To: Andrus <kobruleht2(at)hot(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Why ContinueUpdateOnError is not implemented in npgsql
Date: 2007-01-02 09:52:39
Message-ID: 459A2B67.30802@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andrus wrote:
> Why MS SQL server and Oracle does not have this issue and implement
> ContinueUpdateOnError fast ?
>
> Is this issue caused by PostgreSQL design failure ?

Design decision. An error in a transaction renders that transaction
incomplete. If it's incomplete then it can't be committed. Other RDBMSs
do take a more relaxed approach to this, giving the application more
control. I'm not sure whether it would be practical to change that
decision now, or whether it's too deeply embedded in the code.

But, if you're wanting to do a bulk data upload, why aren't you using a
bulk data loader? Typically these will insert a large set of records and
if there is an error, rollback then try a smaller set (e.g. half) until
they succeed or have one row, then start expanding the set size again
while everything works.

Oh, and if you're doing a lot of this you'll want to look at COPY rather
than a batch of inserts. Not sure how/if that's supported with npgsql
I'm afraid.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2007-01-02 10:00:39 Re: Backup Restore
Previous Message Alban Hertroys 2007-01-02 09:39:16 Re: select union with table name