|
|
|
|
|
by solox3
2039 days ago
|
|
"CharField with huge max_length (5000)" If I'm on postgres and actually want my comments to have a max length of 5000, is it suggesting that using CharField(max_length=5000) is a problem with my design? Using CharField / VARCHAR vs TextFIeld / TEXT should not have a performance difference in postgresql. |
|
I think it's important to have the length constraint at the database level for data consistency's sake. Then you can choose to add in app level validations to make more friendly user error messages.
Changing a constraint's length is also a much easier database operation vs. changing a varchar's length.