title: Update columns based on subquery containing "select unnest" clause
body: <p>I am attempting to update a boolean column in one table based upon the values in a second.</p>
  
  <pre class="lang-sql prettyprint-override"><code>UPDATE channels
  SET contains_photos = TRUE 
  WHERE id IN (SELECT unnest(ancestors) 
      FROM channel_tree WHERE id = 11329);
  </code></pre>
  
  <p>The <code>channel_tree.ancestors</code> column contains an array of channel IDs. The above is failing with the following error:</p>
  
  <blockquote>
    <p>ERROR:  cannot TRUNCATE "channel_tree" because it is being used by active queries in this session</p>
  </blockquote>
  
  <p>The overriding goal is to set the <code>contains_photos</code> column to true for all <code>ancestors</code> of a given channel. Any one know how best to alleviate this error, or even an alternative solution?</p>