> On Jun 29, 2017, at 12:13 AM, Hick Gunter <h...@scigames.at> wrote:
> 
> Double quotes is specifically for building identifiers that "look strange" 
> (i.e. embedded spaces, keywords, ...) which IMHO should be avoided because it 
> tends to clutter up the statement.

I agree that if you’re generating the schema by hand you should avoid creating 
names that require quoting.

However, if tables/columns/indexes are being generated dynamically, it can be 
very convenient to name them based on the external item that uses them, and 
that name might involve “strange” characters.

In my case, I create indexes on the fly based on JSON paths like 
“address[0].zipcode”, so I use the path as part of the index name. This is 
simpler than escaping the punctuation, using a digest of the path, or making up 
an identifier that then has to be stored somewhere else. It also makes the 
schema a lot easier to understand when looking at generated statements or 
poking around in the sqlite3 tool.

—Jens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to