PostgreSQL - Exception when insert value larger than a smallint on a field that was previously smallint
<p>I have a table that used a field with <strong>smallint</strong> value. After insert some data, notice that I needed a more larger number type, and changed it to <strong>integer</strong> but now when insert a value out of range of smallint it will throw an exception, but insert the value as normal.</p>

<pre><code>SQLSTATE[22003]: Numeric value out of range: 7 ERROR: value "40000" is out of range for type smallint
</code></pre>

<p>Could be somewhere in the structure of the table the reference of being a smallint once ?</p>