title: Use multiple rows from the same table in UPDATE of one row in another table
body: <p>I am using pgadmin for PostgreSQL (9.1) and I have this query which takes too long to run</p>
  
  <pre><code>update tableA a
  set owner1_surname = (select owner_surname from owners_distinct b where a.owner1= b.owner),
  owner1_othername   = (select owner_othername from owners_distinct b where a.owner1= b.owner),
  owner2_surname     = (select owner_surname from owners_distinct b where a.owner2= b.owner),
  owner2_othername   = (select owner_othername from owners_distinct b where a.owner2= b.owner),
  owner3_surname     = (select owner_surname from owners_distinct b where a.owner3= b.owner),
  owner3_othername   = (select owner_othername from owners_distinct b where a.owner3= b.owner)
  </code></pre>
  
  <p>Instead of having to retrieve the values from <code>owners_distinct table</code> again and again, is it possible to retrieve the columns <code>owner</code>, <code>owner_surname</code> and <code>owner_othername</code> just once using <code>SELECT</code> and then do <code>UPDATE</code> on <code>tableA</code>'s columns based on the check?</p>