About STRICT tables
A column about strict tables has appeared in the draft site:
Possibly a good idea to raise a discussion on it. I'll open with a few things:
- The syntax to mark a table as strict puts the word STRICT at the end of the CREATE line. Is there a good reason why the word doesn't go after CREATE ? I'm likely to 'lose' a word at the end of the line: my eyes could pass over it and not see it.
- Could correct use of single and double quotes be enforced for the strict CREATE commands ? Or is that better associated with the strict PRAGMA ?
- Could the strict mode make all tables STRICT, whether declared STRICT or not ?
For reference, here's the page about strict mode:
The draft page has INT and INTEGER as separate types while the wiki implies they are synonyms. The draft page also lacks ANY as an allowed type.
One more question that is not immediately clear to me. 4. Are these type names the only thing that may be used as types or can they still be decorated with a length? And will this length be enforced? E.g. CREATE TABLE ShortNumber ( N INTEGER(3) ) STRICT
Only values between -999 and 999
No such decoration is allowed under STRICT.
To add to Larry's comment and in case it wasn't clear to you before: Length decorations were never used or useful in SQLite although they were allowed for compatibility sake (much like fake TYPE names), hence they won't be allowed in STRICT tables.
 Length indicators after Text-affinity type-names (Varchar etc.) were "consulted" for some query optimization in the Query Engine, when given. But they never had any data impact or restrictive qualities.