Re: SELECT FOR UPDATE - Mailing list pgsql-general

From Mike Castle
Subject Re: SELECT FOR UPDATE
Date
Msg-id 20010823081129.B9288@thune.mrc-home.com
Whole thread Raw
In response to Re: SELECT FOR UPDATE  (Jan Wieck <JanWieck@Yahoo.com>)
Responses Re: SELECT FOR UPDATE
List pgsql-general
On Thu, Aug 23, 2001 at 10:09:19AM -0400, Jan Wieck wrote:
> Oliver Elphick wrote:
> > I can see arguments to support this view, but consider this classic
> > scenario:
> >
> > User1: Read data into an interactive program
> > User1: Start to make changes
> > User2: Read data into an interactive program
> > User2: Start to make changes
> > User1: Save changes
> > User2: Save changes

Consider replacing "Save changes" with:

User1: Lock record, compare original with current record, save if same, unlock
User2: Lock record, compare original with current record, notice difference, abort.

So, yes, 3 buffers:  One for original record, one for modified record, one
to hold record for comparison (during lock).

mrc
--
     Mike Castle      dalgoda@ix.netcom.com      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc

pgsql-general by date:

Previous
From: Mike Finn
Date:
Subject: Re: Comparing fixed precision to floating (no anwer)
Next
From: Gilles DAROLD
Date:
Subject: Problem with libpsqlodbc