title: PostgreSQL: between with datetime
body: <p>I use PostgreSQL 8.4.11 and find strange error. When I query:</p>
  
  <pre><code>SELECT "documents_document"."given_on" 
  FROM "documents_document" 
  WHERE (EXTRACT('month' FROM "documents_document"."given_on") = 1
         AND "documents_document"."given_on" 
         BETWEEN '1-01-01 00:00:00' and '1-12-31 23:59:59.999999') 
  ORDER BY "documents_document"."created_on" DESC
  </code></pre>
  
  <p>I get results:</p>
  
  <pre><code>  given_on  
  ------------
   2002-01-16
   2011-01-25
   2012-01-12
   2012-01-12
   2012-01-12
   2012-01-20
   2012-01-19
   2012-01-13
   2012-01-31
   2012-01-16
   2012-01-31
   2012-01-12
   ...
  </code></pre>
  
  <p>Why?</p>
  
  <p>I would expect dates in interval 1-01-01 ... 1-12-31.</p>