| От | Tom Lane |
|---|---|
| Тема | Re: [GENERAL] Deadlock with single update statement? |
| Дата | |
| Msg-id | 8292.1497122186@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [GENERAL] Deadlock with single update statement? (Rob Nikander <rob.nikander@gmail.com>) |
| Ответы |
Re: [GENERAL] Deadlock with single update statement?
|
| Список | pgsql-general |
Rob Nikander <rob.nikander@gmail.com> writes:
>> On Jun 10, 2017, at 10:34 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> […] but it'd be better to adjust the query to ensure a deterministic
>> update order.
> Thank you for the answer. Since `update` has no `order by` clause, I’m guessing there’s no way to do this with just
the`update` statement, and that I should use `select … order by … for update’ for this.
Yeah, that's one easy answer. You can probably force it with a sub-select
in the UPDATE, as well, but it will take more thought.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера