Re: UPDATE COMPATIBILITY - Mailing list pgsql-sql

From Thomas Kellerer
Subject Re: UPDATE COMPATIBILITY
Date
Msg-id jf3cl1$bap$1@dough.gmane.org
Whole thread Raw
In response to UPDATE COMPATIBILITY  (Gera Mel Handumon <geramel.h@gmail.com>)
Responses Re: UPDATE COMPATIBILITY
Re: UPDATE COMPATIBILITY
List pgsql-sql
Gera Mel Handumon, 17.01.2012 07:31:
> What version of postgresql that the update compatibility below will be
> implemented?
>
> UPDATE COMPATIBILITY
>
>
> UPDATE accounts SET (contact_last_name, contact_first_name) =
>      (SELECT last_name, first_name FROM salesmen
>       WHERE salesmen.id = accounts.sales_id);

None as far as I know.

You need to rewrite it to:

UPDATE accounts  SET contact_last_name = s.last_name,      contact_first_name = s.first_name
FROM salesmen s
WHERE s.id = accounts.sales_id




pgsql-sql by date:

Previous
From: Feike Steenbergen
Date:
Subject: Wrong query plan when using a left outer join
Next
From: John Tuliao
Date:
Subject: Re: Query Problem... Left OuterJoin / Tagging Issue