Re: Using the database to validate data

Поиск
Список
Период
Сортировка
От JPLapham
Тема Re: Using the database to validate data
Дата
Msg-id 1437746110360-5859239.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: Using the database to validate data  (Zdeněk Bělehrádek<zdenek.belehradek@superhosting.cz>)
Ответы Re: Using the database to validate data  (Adam Brusselback <adambrusselback@gmail.com>)
Список pgsql-general
Zdeněk Bělehrádek wrote
> What about creating a SAVEPOINT before each INSERT, and if the INSERT
> returns
> an error, then ROLLBACK TO SAVEPOINT? This way you will have all the
> insertable data in your table, and you can still ROLLBACK the whole
> transaction, or COMMIT it if there were no errors.
>
> It will probably be quite slow, but if you have only thousands of lines,
> it
> should be fast enough for your usecase IMHO.
>
> -- Zdeněk Bělehrádek

Hmmm, interesting. Thanks, if that works, it would be exactly what I'm
looking for!

You are right, speed is not an issue.

-Jon



--
View this message in context: http://postgresql.nabble.com/Using-the-database-to-validate-data-tp5859046p5859239.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: JPLapham
Дата:
Сообщение: Re: Using the database to validate data
Следующее
От: Alejandro Taboada
Дата:
Сообщение: BDR Error on Debian wheezy packages