title: Cannot cast type record to integer
body: <p>I'm trying to insert data from one table to another by using:</p>
  
  <pre><code>INSERT INTO production.spend_fact (date, client_id, show_name, network_name,
  media_type, spend, load_id, note)
  
  SELECT date, client_id, show_name, network_name, media_type, spend, load_id,
  note
  FROM staging.spend_fact
  JOIN
   (SELECT MAX(load_id)
    FROM production.load_dim) AS load_id
  ON 1=1;
  </code></pre>
  
  <p>This query previously worked until I added a new column (note) to both tables and now I am getting this error:</p>
  
  <pre><code>ERROR: column "load_id" is of type integer but expression is of type record
  </code></pre>
  
  <p>I have tried casting "load_id" by CAST(load_id AS INT) and load_id::int but both do not work.</p>
  
  <p><em>load_id FROM production.load_dim is type serial</em></p>
  
  <p><em>load_id FROM production.performance_fact is type integer</em></p>