title: Postgres data type cast
body: <p>My database is Postgres 8. I need to cast data type to another. That means, one of columns data type is <code>varchar</code> and need to cast it into <code>int</code> with Postgres in a <code>SELECT</code> statement.</p>
  
  <p>Currently, I get the string value and cast it into <code>int</code> in Java.<br>
  Is there any way to do it? Sample code would be highly appreciated. </p>