3 ms·
This aspect will probably never change: > Flexible typing is considered a feature of SQLite, not a bug. Nevertheless, we recognize that this feature does some
by jraph 6y ago
This aspect will probably never change:
> Flexible typing is considered a feature of SQLite, not a bug. Nevertheless, we recognize that this feature does sometimes cause confusion and pain for developers who are acustomed to working with other databases that are more judgmental with regard to data types. In retrospect, perhaps it would have been better if SQLite had merely implemented an ANY datatype so that developers could explicitly state when they wanted to use flexible typing, rather than making flexible typing the default. But that is not something that can be changed now without breaking the millions of applications and trillions of database files that already use SQLite's flexible typing feature.
https://sqlite.org/quirks.html#flexible_typing https://sqlite.org/quirks.html#flexible_typing
- rini17 6y agoIt is possible to create check constraints that do the type checking. Actually, if they shipped some predefined ones and said "if you want strong type checking do this", like, syntax to automatically populate the table columns with type check constraints, it would be IMO perfectly backward compatible.
- darksaints 6y agoAt the very least we could get strict versions of data types, or some sort of key word used in the ddl to specify strict typing.
- attilakun 6y agoThis might help: https://dba.stackexchange.com/a/222271 https://dba.stackexchange.com/a/222271