title: How to determine which column is implicated in "value too long for type character varying"?
body: <p>I'm programatically adding data to a PostgreSQL table using Python and psycopg - this is working fine.</p>
  
  <p>Occasionally though, a text value is too long for the containing column, so I get the message:</p>
  
  <blockquote>
    <p>ERROR: value too long for type character varying(1000)</p>
  </blockquote>
  
  <p>where the number is the width of the offending column.</p>
  
  <p>Is there a way to determine <strong>which column</strong> has caused the error? (Aside from comparing each column's length to see whether it is 1000)</p>