On 1/23/17, Ersin Akinci <ersin.aki...@gmail.com> wrote: > CREATE INDEX index_reports_on_yearz_doesnt_exist ON reports > ("yearz_doesnt_exist"); > > > I understand that the double quotation syntax is used to indicate > identifiers. Why am I allowed to create an index on a non-existent column > when I use double quotes? >
SQLite has a (mis-)feature that double-quoted names that cannot be resolved to a table or column name are treated as strings. This was a very early design decision, made long before SQLite went viral and found itself running in everything device on the planet, and was intended to make SQLite more compatible with MySQL, which at the time was the most widely deployed database engine in the world. I regret that choice now, but I cannot undo it without breaking backwards compatibility. On the other hand, the ability to index an expression is a relatively new feature. Maybe we can disable the double-quote-to-string mis-feature for that one isolated case. Maybe. I'll look into it. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users