title: Change the character varying length with ALTER statement?
body: <p>I am trying to change length of a column from <code>character varying(40)</code> to <code>character varying(100)</code>.</p>
  
  <p>Following the method described in this question <a href="https://stackoverflow.com/questions/5488428/increasing-the-size-of-character-varying-type-in-postgres-without-data-loss">Increasing the size of character varying type in postgres without data loss</a></p>
  
  <pre><code>ALTER TABLE info_table ALTER COLUMN docs TYPE character varying(100);
  </code></pre>
  
  <p>Tried with this command but returning syntax error</p>
  
  <blockquote>
    <p>ERROR:  syntax error at or near "TYPE" at character 52</p>
  </blockquote>
  
  <p>Is there any change needed in this command? Using PostgreSQL version 7.4.30 (upgrade to 9.2 in process :) ). </p>
  
  <p>I tried this same command in test db which is now upgraded with version 9.2. It is working fine there. </p>