Re: update with from

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Sim Zacks <sim(at)compulab(dot)co(dot)il>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: update with from
Date: 2012-01-23 14:34:37
Message-ID: CAF-3MvO1G8OsRu+FFRmmFZZmXgVud7NvrEfs+8XhmteB+KFRnA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 23 January 2012 14:48, Sim Zacks <sim(at)compulab(dot)co(dot)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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2012-01-23 14:37:50 Re: Is Synchronous Postgresql Replication Slower Than Asynchronous?
Previous Message Stuart Bishop 2012-01-23 14:30:35 Re: Is Synchronous Postgresql Replication Slower Than Asynchronous?