| От | Jean-Christian Imbeault |
|---|---|
| Тема | Re: Duplicate key insert question |
| Дата | |
| Msg-id | 3F0238D4.1030307@mega-bucks.co.jp обсуждение |
| Ответ на | Duplicate key insert question (Jean-Christian Imbeault <jc@mega-bucks.co.jp>) |
| Список | pgsql-general |
Alvaro Herrera wrote: > > Well, he is right. One will fail, the other will not. The race > condition is for the application. If you want to ignore it, you can do > that, but there _will_ be an ERROR thrown and the transaction will be > aborted. Ah ... then maybe this solution is 'good enough'. It will still generate an error message some of the time (when there is a race condition) but will definitely generate fewer error messages than the current method used which is just to do the insert and let it fail if there is already a record with the same primary key. Thanks for the help! Jean-Christian Imbeault
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера