row locking
row locking
От:
Sebastian Bossung <bossung@gmx.de>
Дата:
Hi,
I am sure this is an easy question, but I just don't seem to be able to
produce an answer to it:
How do you make sure hat a row, that is loaded for editing into a client
application cannot be altered by another client before it is written back to
the database?
Do you have to use your own system of extra fields in the database or does
SQL provide means for locking rows?
Thanks for your help
Sebastian
--
Sebastian Boßung - bossung@gmx.de
http://www.bossung.org
# Anybody who doesn't cut his speed at the
# sight of a police car is probably parked.
Re: row locking
От:
ERIC Lawson - x52010 <eric@bioeng.washington.edu>
Дата:
On Mon, 5 Mar 2001, Sebastian Bossung wrote: > Hi, > > I am sure this is an easy question, but I just don't seem to be able to > produce an answer to it: > How do you make sure hat a row, that is loaded for editing into a client > application cannot be altered by another client before it is written back to > the database? > Do you have to use your own system of extra fields in the database or does > SQL provide means for locking rows? > One answer is that the SQL implemented by PostgreSQL allows a SELECT .... FOR UPDATE query. That's the easy answer, or, the one I know for sure. -- James Eric Lawson Research Publications Editor III National Simulation Resource eric@bioeng.washington.edu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Everyday language is a part of the human organism and is no less complicated than it. - Ludwig Wittgenstein (1889-1951) [Tractatus Logico-Philosophicus, 1921]