Re: UPDATE ... RETURNING atomicity

From: Lew <noone(at)lewscanon(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: UPDATE ... RETURNING atomicity
Date: 2010-05-23 17:15:40
Message-ID: htbnr4$r2q$1@news.albasani.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/23/2010 02:15 AM, rihad wrote:
> In this query:
> UPDATE foo
> SET allocated_to=?
> WHERE id=(SELECT MIN(id) FROM foo WHERE allocated_to IS NULL)
> AND allocated_to IS NULL
> RETURNING id

Isn't the "AND allocated_to IS NULL" clause redundant?

--
Lew

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ken Winter 2010-05-23 18:51:36 ROLLBACK in a function
Previous Message rihad 2010-05-23 16:13:48 Re: UPDATE ... RETURNING atomicity