title: Failed to find conversion function from unknown to boolean error
body: <pre><code>query = """UPDATE table SET last_tracked = %s, being_tracked = %s WHERE(
                  SELECT 'X' FROM temp_table
                  WHERE table.selected_id = temp_table.selected_id);"""
  cur.execute(query, [datetime.utcnow().isoformat(' ').split('.')[0] + ' z', True])
  </code></pre>
  
  <p>The above python/psycopg2 code gives the following error:</p>
  
  <pre><code>ERROR:  failed to find conversion function from unknown to boolean
  STATEMENT:  UPDATE table 
              SET last_tracked = '2015-07-02 20:32:00 z', being_tracked = true 
              WHERE(
                  SELECT 'X' FROM temp_table
                  WHERE table.selected_id = temp_table.selected_id);
  </code></pre>
  
  <p>The following code works perfectly fine:</p>
  
  <pre><code>query = """UPDATE table SET being_tracked = %s
                WHERE NOT EXISTS(
                    SELECT 'X' FROM temp_table
                    WHERE table.selected_id = temp_table.selected_id);"""
  cur.execute(query, [False])
  </code></pre>
  
  <p>I'm trying to only update rows that already exist in the table. What am I doing wrong here?</p>