Why are you allowed to set DB field length on Text fields?
being able to set a length make sense. As you describe, you might want to have the length limited, because it's a zip code, a country code, a whatever you know has a fixed length.

The problem is not on the database definition, but on the user interface, that should prevent being able to put more chars that the field can accept.

Where do you experience the problem? is this in the back-office or using profiles?

Would be awesome if you could correct civicrm core to the check is done at the interface level (don't make the field longer than what the database can store) instead of the ugly error triggered by the database.

(You might want to check on the next version of civi see if you're lucky and that has already been fixed)

X+