Locking row - Mailing list pgsql-sql

From Flavio Suguimoto
Subject Locking row
Date
Msg-id GFEGIFLJJCMGLBLAHILKEEDECGAA.flavio.suguimoto@pragyatechnologies.com
Whole thread Raw
In response to Re: How can I selet rows which have 2 columns values cross equal?  (Bruno Wolff III <bruno@wolff.to>)
Responses Re: Locking row
List pgsql-sql
Hi all,

I need to mark a row with a value in a column, but first i need to select
the first row without this mark. But in some concurrents cases i mark the
row twice. How can i lock the row to avoid others session get it?

TABLE TICKET
TICKET_NUMBER | MARK       00001 |    1       00002 |    0

I need to select the first row with 0 in MARK column and then mark it with
1.

regards,
Flavio Suguimoto



pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: How can I selet rows which have 2 columns values cross equal?
Next
From: "Larry Rosenman"
Date:
Subject: Re: Locking row