title: Rails: Get PostgresQL table column type
body: <p>If I have a table of varying PostgresQL data types:</p>
  
  <pre><code>  CREATE TABLE users (
      name varchar(255),
      age int4
    );
  </code></pre>
  
  <p>When I get that table's columns through the model, the sql_type returned is different than what I entered:</p>
  
  <pre><code>User.columns.first.name #=&gt; "name"
  User.columns.first.sql_type #=&gt; "character varying"
  User.columns.last.name #=&gt; "age"
  User.columns.last.sql_type #=&gt; "integer"
  </code></pre>
  
  <p>How can I get the original types? In this case it would be <code>varchar(255)</code> and <code>int4</code>.</p>