Re: Why ContinueUpdateOnError is not implemented in npgsql

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Why ContinueUpdateOnError is not implemented in npgsql
Дата
Msg-id 459A2B67.30802@archonet.com
обсуждение исходный текст
Ответ на Re: Why ContinueUpdateOnError is not implemented in npgsql  ("Andrus" <kobruleht2@hot.ee>)
Список 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 по дате отправления:

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: select union with table name
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: Backup Restore