From: John Cowan <xxxxxx@ccil.org>
Date: Friday, October 25, 2019 10:06 AM

On Fri, Oct 25, 2019 at 9:50 AM <xxxxxx@ancell-ent.com> wrote:
 
The standard says so, but PostgreSQL case folds "unquoted names" to lower case, explicitly in violation of it: https://www.postgresql.org/docs/current/sql-syntax-lexical.html

Feh.  SQLite, it turns out, supports quoted identifiers only in column aliases.

It's "Industrial Strength" in its own ways....  And that's very possibly an 80/20 or nearly so for quoting identifiers.

That page pointed out something else, namely that it's valid to say:

SELECT "SELECT", "select" from "Select" ...

But I say it's spinach,

And if I remember correctly the PostgreSQL documentation I just reviewed says it will error on that.  Except it might take Select, I think it said it would do the obvious but non-standard thing for mixed case identifiers.

and I say the hell with it.

That's probably OK, although those of you who've seen lots of databases in the wild, have you seen much of this?  Were any of those databases you really want to work on ^_^?

I'm already covering far more than 80:20 here.   I'm not even going to bother with dollar signs.   I'll stick with the change I already made, because we don't want people writing create-table-foo anyway, but capitalizing keywords is for SQL (a case-insensitive language however you look at it), not for its S-expression image in a case-sensitive language.

Yeah, create-table-foo is very bad form and in no way required, while surely there are are some databases out there with wild schema.  But as you note, you're almost certainly way beyond 80/20 now.

Although, what about a general escape?  I.e. a mechanism for "insert exactly this text *here*"?

- Harold