Re: Implementation of LIMIT on DELETE and UPDATE statements - Mailing list pgsql-patches

From Stephan Szabo
Subject Re: Implementation of LIMIT on DELETE and UPDATE statements
Date
Msg-id 20020925080434.E8681-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Implementation of LIMIT on DELETE and UPDATE statements  (Yury Bokhoncovich <byg@center-f1.ru>)
List pgsql-patches
On Wed, 25 Sep 2002, Yury Bokhoncovich wrote:

> Hello!
>
> On Mon, 23 Sep 2002, Tom Lane wrote:
>
> > The above is really a perfect example of why this feature isn't safe:
> > it would lead people to make unwarranted assumptions.  The fact that
> > such-and-such a tuple appeared second in the output of LIMIT 10 OFFSET
> > 20 does *not* mean that it would be selected by LIMIT 1 OFFSET 21.  The
>
> Agreed. But if records are inserted by INSERT (times) values (now()) and
> those are selected ORDER BY times - the result is probably well
> determined.;)

Only if you're in serializable isolation mode or if there's never more
than one concurrent update transaction.  Otherwise concurrent updates that
have committed between the select and delete could change the set of rows
you see and therefore the rows you delete. TANSTAAFL unfortunately.


pgsql-patches by date:

Previous
From: Yury Bokhoncovich
Date:
Subject: Re: Implementation of LIMIT on DELETE and UPDATE statements
Next
From: Steven Singer
Date:
Subject: contrib/dbmirror bug + doc fix.