Skip site navigation (1) Skip section navigation (2)

Re: Implementation of LIMIT on DELETE and UPDATE statements (rel to 7.2.1)

From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: srb(at)cuci(dot)nl (Stephen R(dot) van den Berg)
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Implementation of LIMIT on DELETE and UPDATE statements (rel to 7.2.1)
Date: 2002-09-21 23:35:03
Message-ID: 20020921193503.7bf3ed2c.alvherre@atentus.com (view raw or flat)
Thread:
Lists: pgsql-patches
En Sun, 22 Sep 2002 01:19:24 +0200
srb(at)cuci(dot)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?
> Somehow the argumentation is not conclusive.

Yes, I was thinking the same thing when I answered earlier.

I am in the same position as you here (meaning someone who has
contributed some patch), so my opinion doesn't have a lot of weigth; but
as I already said, the feature has some value with the ORDER BY added,
and the LIMIT/OFFSET thing expanded to allow expressions (this last part
is in TODO).

Clearly an ORDER BY clause without LIMIT doesn't make any sense; but
it does with it.

-- 
Alvaro Herrera (<alvherre[a]atentus.com>)
"Para tener mas hay que desear menos"

In response to

Responses

pgsql-patches by date

Next:From: Alvaro HerreraDate: 2002-09-22 02:26:17
Subject: Re: DROP COLUMN misbehaviour with multiple inheritance
Previous:From: Stephen R. van den BergDate: 2002-09-21 23:19:24
Subject: Re: Implementation of LIMIT on DELETE and UPDATE statements (rel to 7.2.1)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group