Re: update with from - Mailing list pgsql-general

From Alban Hertroys
Subject Re: update with from
Date
Msg-id CAF-3MvO1G8OsRu+FFRmmFZZmXgVud7NvrEfs+8XhmteB+KFRnA@mail.gmail.com
Whole thread Raw
In response to Re: update with from  (Sim Zacks <sim@compulab.co.il>)
Responses Re: update with from
List pgsql-general
On 23 January 2012 14:48, Sim Zacks <sim@compulab.co.il> wrote:
>> In my tests, if the joined rows are sorted it always updates with the
>> first row. Does anyone have any other experiences, or should I be
>> concerned that at some point it will behave differently?
>
> I checked my tests again. It always uses the last one, not the first one.
>
> Sim

I expect that your records get updated multiple times too.

Perhaps you can use DISTINCT ON in your from-based UPDATE?

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

pgsql-general by date:

Previous
From: Stuart Bishop
Date:
Subject: Re: Is Synchronous Postgresql Replication Slower Than Asynchronous?
Next
From: Simon Riggs
Date:
Subject: Re: Is Synchronous Postgresql Replication Slower Than Asynchronous?