SQLite Forum

CAST type-name is optional
For the sake of a virtue I call orthogonality, I think the parser should accept this construction. The rule is simple: However a type affinity could be specified in a column definition, that is how it can be specified in the cast.

However, as you advocate, I see no good reason to document it. The purpose of a cast is better served by use of an explicit type name rather than by how such defaults when not stated. The grammar is sensible but the semantics less so, in this context.

I was surprised to find that the said "default" is not BLOB as would be the case in a column definition. Instead it appears to be numeric (as you say.) To my way of thinking, this defeats the orthogonality virtue.