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

From Alvaro Herrera
Subject Re: Implementation of LIMIT on DELETE and UPDATE statements
Date
Msg-id Pine.LNX.4.44.0209231329130.2451-100000@cm-lcon1-46-187.cm.vtr.net
Whole thread Raw
In response to Re: Implementation of LIMIT on DELETE and UPDATE statements  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane dijo:

> Yury Bokhoncovich <byg@center-f1.ru> writes:
> > Imagine typical usage of LIMIT/OFFSET: pagination of a web-output.
> > Say, the output is fetched thru "select id,body from articles limit 10
> > offset 20".
> > Now, content-admin, surfing the content and looking to the page say 2,
> > wanna drop all info on THAT page 2.
> > Guess how it could ease the life for programmer?8)

I don't understand.  It's somewhat more difficult to grab all the
primary keys of the currently-selected items (and you can put a
Javascript button with "select all in this page"), this I concede.  But
how is it better to be unsure if you are really deleting what you want
to delete?  Suppose another admin is also deleting and the LIMIT/OFFSET
shifts between the time the page is presented and the button "delete
these" is pressed...

"Hey, PostgreSQL is stupid," they'll say.  "How can they offer such an
unsafe misfeature."

--
Alvaro Herrera (<alvherre[a]atentus.com>)
"God is real, unless declared as int"


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: contrib/dblink regression test failure fix
Next
From: Joe Conway
Date:
Subject: Re: contrib/dblink regression test failure fix