Take the 2-minute tour ×

I'm getting this error when saving a Django Model Object:

DatabaseError: value too long for type character varying(1000)

Inside the model there is a textfield:


I'm saving a string of over 1000 characters into this field (song lyrics). The webapp works when run locally, which also uses postgresql, but generates this error when deployed on Heroku

Is there a hard limit on Heroku's postgresql or is there a way to increase it?


share|improve this question
This is definitely not a hard limit on PostgreSQL. The question is how best to lift the limit. Ideally you'd probably do it in Django I assume instead of ALTER TABLE foo ALTER COLUMN bar TYPE varchar; –  Chris Travers Dec 10 '13 at 4:37
Can you post your models.py with this model and the view or code that is inserting the data. –  Burhan Khalid Dec 10 '13 at 4:50

Your Answer



Browse other questions tagged or ask your own question.