| От | Verena Ruff |
|---|---|
| Тема | Transactions and unique constraint |
| Дата | |
| Msg-id | 200606121504.47300.lists@triosolutions.at обсуждение исходный текст |
| Ответы |
Re: Transactions and unique constraint
|
| Список | pgsql-novice |
Hi everyone, I have a problem with 2 inherited tables and a primery key constraint. table a ( id serial primary key ); table b () inherits (a); alter table b add constraint If I delete one record of a, and then insert the same values into b, there is an error telling me there is a duplicate key violating the unquie key constraint. This 2 queries are following directly each other in my PHP code. If I run the 2nd query (which inserts the values) afterwards with psql, it works. It seems like Postgres needs some time recognizing that the primary key isn't used any more. These queries are part of a transaction. Any hints how I get this working? Thanks, Verena
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера