| От | Ben Young |
|---|---|
| Тема | Updates not atomic with respect to indexes |
| Дата | |
| Msg-id | 200404280933.34378.ben@transversal.com обсуждение исходный текст |
| Ответы |
Re: Updates not atomic with respect to indexes
Re: Updates not atomic with respect to indexes |
| Список | pgsql-general |
Hi there, I am having a problem with the following code: CREATE TABLE temp ( num integer UNIQUE ); INSERT INTO temp (num) VALUES (1); INSERT INTO temp (num) VALUES (2); INSERT INTO temp (num) VALUES (3); UPDATE temp SET num = num+1; If the update is really meant to be atomic then this should work, as the column is still unique afterwards. However, I get a ERROR: duplicate key violates unique constraint "temp_num_key" Is this something I misunderstand about SQL & ACID in general, a known problem in Posgresql, or bug which will be fixed sometime. Should I report this as a bug? Thanks for your help in advance! Ben Young
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера