UPDATE .. JOIN?

From: Sergei Shelukhin <realgeek(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: UPDATE .. JOIN?
Date: 2008-01-12 22:22:21
Message-ID: 47893D9D.5080603@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi.

I was wondering if I could do something similar to this in Postgres and
if yes how?

UPDATE table1 SET blah = 1 FROM table1
INNER JOIN table2 ON table1.id = table2.t1id

If not, is there any way to make UPDATE ... WHERE id IN (....) use indexes?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-01-12 23:36:42 Re: Many 8.3 server crashes in xmlCleanupCharEncodingHandlers()
Previous Message Kris Jurka 2008-01-12 22:04:41 Re: Prepared Statements