Re: Using the database to validate data

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Using the database to validate data
Дата
Msg-id CAMkU=1yKiroBsgEjJHPjTsc4GLP13XtrXyy4gLu=For_JvHkZw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Using the database to validate data  (Zdeněk Bělehrádek<zdenek.belehradek@superhosting.cz>)
Список pgsql-general
On Fri, Jul 24, 2015 at 5:17 AM, Zdeněk Bělehrádek <zdenek.belehradek@superhosting.cz> wrote:
What about creating a SAVEPOINT before each INSERT, and if the INSERT returns
an error, then ROLLBACK TO SAVEPOINT?

Make sure you release the savepoint if there was no error.  Otherwise you will quickly run out of memory.

Also, if there was an error, then after rolling back to the savepoint either release it, or refrain from starting a new one at the beginning of the next insert.

Cheers,

Jeff 

В списке pgsql-general по дате отправления:

Предыдущее
От: Chris Withers
Дата:
Сообщение: pgbench tps drop from 5000 to 37 going from localhost to a server 13ms away
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Delete rule does not prevent truncate