Re: [HACKERS] select order by for update

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [HACKERS] select order by for update
Дата
Msg-id 375F320C.B0AE576A@krs.ru
обсуждение исходный текст
Ответ на select order by for update  (Vadim Mikheev <vadim@krs.ru>)
Список pgsql-hackers
> There is another problem in subj - sometimes application gets
> ERROR: EvalPlanQual: t_xmin is uncommitted ?!
> I'll try to find why. Mark (Wright), could you avoid
> order by in PL function? If you really need in ordered
> updates then try to create index on id_number and add
> id_number >= 0 to WHERE in select for update.

Ops, this will not work in all cases. Try to rewrite select:

SELECT * FROM test_attendees
WHERE print_status = 'R'
AND id_number = (select min(id_number) from test_attendees)
FOR UPDATE OF test_attendees

and run it in loop.

Vadim


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Vadim Mikheev
Дата:
Сообщение: select order by for update
Следующее
От: Chris Bitmead
Дата:
Сообщение: BUG in 6.5 - GROUP BY inheritance