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

From Jan Wieck
Subject Re: Implementation of LIMIT on DELETE and UPDATE statements
Date
Msg-id 3D90AEEF.D791F89A@Yahoo.com
Whole thread Raw
In response to Implementation of LIMIT on DELETE and UPDATE statements (rel to 7.2.1)  (srb@cuci.nl (Stephen R. van den Berg))
List pgsql-patches
Tom Lane wrote:
>
> > srb@cuci.nl (Stephen R. van den Berg) escribió:
> >> Incidentally, using a SELECT without an ORDER BY but with a LIMIT is
> >> documented to give unpredictable results, yet users are expected cope with
> >> this fact, but are expected to have problems with a similar fact in
> >> an UPDATE or DELETE statement?
>
> Well, IMHO there's a big difference in documented unpredictable output
> from a documented-unpredictable query, as opposed to
> documented-unpredictable changes in the database state.  There is not
> a lot of use for the latter AFAICS.

The next thing we could implement is

    DELETE SOMETHING FROM SOME TABLE [OR NOT];

Very usefull for the type of programmer that needs the proposed LIMIT
patch. It's the only way, those pelletheads can for sure blame the error
on PostgreSQL.

Sarcasm aside, folks, I am 100% with Tom here. No LIMIT on UPDATE or
DELETE.


Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: contrib/dblink regression test failure fix
Next
From: Peter Eisentraut
Date:
Subject: Re: cleanup standard includes