title: ON CONFLICT DO UPDATE has missing FROM-clause
body: <p>I have a simple table (id and name column, both unique), which I am importing a tab delimited CSV file. </p>
  
  <p>I am running psql 9.5, and wanted to try out the new <code>ON CONFLICT</code> feature to update the name column if the ID already exists.</p>
  
  <pre><code>CREATE TEMP TABLE tmp_x AS SELECT * FROM repos LIMIT 0;
  COPY tmp_x FROM '/Users/George/git-parser/repo_file' (format csv, delimiter E'\t');
  INSERT INTO repos SELECT * FROM tmp_x
  ON CONFLICT(name) DO UPDATE SET name = tmp_x.name;
  DROP TABLE tmp_x;
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <pre><code>SELECT 0
  COPY 1
  ERROR:  missing FROM-clause entry for table "tmp_x"
  LINE 4: ON CONFLICT(name) DO UPDATE SET name = tmp_x.name;
                                                 ^
  Query failed
  PostgreSQL said: missing FROM-clause entry for table "tmp_x"
  </code></pre>
  
  <p>Not too sure whats going wrong here.</p>