title: python psycopg2 ConnectionError: Transaction failed, failure was 'int' object does not support indexing
body: <p>I am using, python psycopg2 to connect to PostGreSQL and fetching some data on based on timestamp. create_date is defined as below:</p>
  
  <pre><code>create_date | timestamp without time zone | not null
  </code></pre>
  
  <p>My query is here</p>
  
  <pre><code>SELECT *                      
  FROM table_name          
  WHERE EXTRACT(EPOCH FROM create_date) &lt; 1367945358;
  </code></pre>
  
  <p>But it throws an error like this, 
      ConnectionError: Transaction failed, failure was 'int' object does not support indexing</p>
  
  <p>Any idea why?</p>