Re: changing multiple pk's in one update - Mailing list pgsql-sql

From Glenn Maynard
Subject Re: changing multiple pk's in one update
Date
Msg-id d18085b50904131501p19d83b3cjde554953a34bb151@mail.gmail.com
Whole thread Raw
In response to Re: changing multiple pk's in one update  (Richard Broersma <richard.broersma@gmail.com>)
List pgsql-sql
On Mon, Apr 13, 2009 at 5:43 PM, Richard Broersma
<richard.broersma@gmail.com> wrote:
> From what I've seen, this problem can affect both surrogate and
> natural key designs.  In both cases, care must be taken to ensure that
> an underling tuple hasn't been changed by any other clients before it
> attempts to commit its changed.   Probably the most common solution is
> to use optimistic locking, another solution that I know of is to use
> serialized transaction isolation.

Right, but if you have a delayed UI, you probably don't want to hold a
lock open--if the user is viewing "/100/3" and clicks "delete", you
need to make sure that the one you delete is the same /100/3 that the
user was viewing at the time.  That's harder to do...

--
Glenn Maynard


pgsql-sql by date:

Previous
From: Richard Broersma
Date:
Subject: Re: changing multiple pk's in one update
Next
From: Stuart McGraw
Date:
Subject: Re: changing multiple pk's in one update