pub fn quoted(text: &str) -> StringExpand description
An identifier as DuckDB’s deparser writes it, quoted when it has to be.
Two grounds for quoting. One is that the word is a keyword in a class, so a column called name
comes back as "name" while one called alias comes back bare, since alias is spelled by a
grammar rule and is in no class. The other is that the text is not one word the tokenizer above
would read back, so my col, 9x and é keep their quotes.
Case is not a ground. UserID comes back exactly like that even though reading it again folds
it, which is the whole reason ClickBench’s column names agree between the two engines.
Here rather than in the binder because two callers want the same rule: a generated column name
and the sql column of duckdb_tables(), which are both a deparser writing an identifier back
out for somebody to read.