2 ms·
Nothing is preventing you from adding your own check constraints, it's just moving from specifying the data storage as having a length to explicitly specifying
by sitharus 13y ago
Nothing is preventing you from adding your own check constraints, it's just moving from specifying the data storage as having a length to explicitly specifying the constraint.
- kiallmacinnes 13y agoI think you missed the entire point of the GP's message. Tomorrow, postgres could release an update that massively improves the performance of CHAR compared to TEXT. You can take advantage of that by using the correct (I.e. semantic) field. Add to that, project requirements change - yea, it happens. What if you need to port to mysql, mssql, oracle etc? Using the correct field types will make that easier, using a premature optimisation combined with a check constraint (blowing away any gains of that premature optimisation) makes that harder