Re: Is this a commit problem?

Поиск
Список
Период
Сортировка
От markw@osdl.org
Тема Re: Is this a commit problem?
Дата
Msg-id 200309251700.h8PH05132125@mail.osdl.org
обсуждение исходный текст
Ответ на Re: Is this a commit problem?  (Gaetano Mendola <mendola@bigfoot.com>)
Список pgsql-hackers
On 25 Sep, Gaetano Mendola wrote:
> markw@osdl.org wrote:
> 
>> 2. SELECT d_next_o_id
>>    INTO current_o_id
>>    FROM district
>>    WHERE d_w_id = 1
>>    AND d_id = 8
>> 
>> 3. UPDATE district
>>    SET d_next_o_id = d_next_o_id + 1
>>    WHERE d_w_id = 1
>>    AND d_id = 8
> 
> I don't  know exactly what you are trying to do
> but usualy in cases like this, in order to avoid
> further problem in the commit phase you ought to
> do a SELECT .... FOR UPDATE  instead.

That appears to have done the trick.  Thanks!

Mark


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Threads vs Processes (was: NuSphere and PostgreSQL for
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Is this a commit problem?