Re: Is this a commit problem?

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Cc: markw(at)osdl(dot)org
Subject: Re: Is this a commit problem?
Date: 2003-09-24 22:46:56
Message-ID: 3F721EE0.5050306@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

markw(at)osdl(dot)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.

Regards
Gaeatano Mendola

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2003-09-24 23:14:53 Re: More Prelimiary DBT-2 Test Results with PostgreSQL 7.3.4
Previous Message Tom Lane 2003-09-24 22:29:26 Re: invalid tid errors in latest 7.3.4 stable.