title: psycopg2 - how to always cast non-string value to string
body: <p>psycopg2's doc has an instruction on how to cast a specific type to a different type:</p>
  
  <blockquote>
    <p>Psycopg converts decimal/numeric database types into Python Decimal objects. Can I have float instead?<br>
    You can register a customized adapter for PostgreSQL decimal type:</p>
  </blockquote>
  
  <pre><code>    DEC2FLOAT = psycopg2.extensions.new_type(
          psycopg2.extensions.DECIMAL.values,
          'DEC2FLOAT',
          lambda value, curs: float(value) if value is not None else None)
      psycopg2.extensions.register_type(DEC2FLOAT)
  </code></pre>
  
  <p>But my data will have a mixture of str, float, integer, decimal, date type, etc. How do i tell psycopg2 to cast any non string value to string? I don't want to register a customized adapter everytime I encounter a new type because my query could change.<br>
  I hope I make the situation clear enough. 
  thanks in advance.</p>