title: Postgres casting field before applying index
body: <p>I have a table with ~10mln rpws that I am querying with date constraint. There's a column <code>dt</code> of type <code>date</code> ( format <code>YYYY-MM-DD</code> ). I have created an index on it: <code>CREATE INDEX dt_dx ON TABLE table(dt)</code> . I run <code>EXPLAIN ANALYZE</code> on it that returned this:</p>
  
  <pre><code>Index Scan using dt_idx on entities  (cost=0.56..74175.26 rows=218 width=64) (actual time=0.069..0.069 rows=0 loops=1)
                                     Index Cond: ((dt)::text = '2017-07-26'::text)
  </code></pre>
  
  <p>Does it mean that <strong>Postgres</strong> is casting column's data to <code>text</code> before comparing values to the query parameters?</p>