2 ms·
PostgreSQL recommends you use the text type everywhere, and use CHECK constraints if you really really really need to limit a field’s length on the database lev
by mikl 5y ago
PostgreSQL recommends you use the text type everywhere, and use CHECK constraints if you really really really need to limit a field’s length on the database level. (VAR)CHAR is considered a code smell. So many fields are artificially limited to 255 bytes because that used to make a performance difference on MySQL 15 years ago.
- billpg 5y agoI feel PostgreSQL should push that as a benefit of their system. I read your comment and said "Where have you been all my life?" "Still using strings with fixed limits like you're a C programmer in the 80s? Use PostgreSQL."