| От | Bruno Wolff III |
|---|---|
| Тема | Re: Conditional INSERT: if not exists |
| Дата | |
| Msg-id | 20060823205744.GB9671@wolff.to обсуждение |
| Ответ на | Re: Conditional INSERT: if not exists ("Don Morrison" <donmorrison@gmail.com>) |
| Ответы |
Re: Conditional INSERT: if not exists
|
| Список | pgsql-novice |
On Wed, Aug 23, 2006 at 12:48:53 -0700, Don Morrison <donmorrison@gmail.com> wrote: > > My problem: if the insert fails because the value already exists, then > this starts a rollback of my entire transaction. The solution I'm If you know there won't be concurrent inserts or deletes affecting the row of interest there is a way to do this in the INSERT statement. > transaction...I'm not sure the nested transaction is necessary...maybe > just the savepoint. Example: Using save points creates nested transactions, so you have that overhead by whatever name it is called.
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера