Re: Why ContinueUpdateOnError is not implemented in npgsql - Mailing list pgsql-general

From Richard Huxton
Subject Re: Why ContinueUpdateOnError is not implemented in npgsql
Date
Msg-id 459A2B67.30802@archonet.com
Whole thread Raw
In response to Re: Why ContinueUpdateOnError is not implemented in npgsql  ("Andrus" <kobruleht2@hot.ee>)
List 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

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: select union with table name
Next
From: Richard Huxton
Date:
Subject: Re: Backup Restore