Ulrik Petersen wrote:

I guess the next question is: Can someone verify that this is part of the SQL standard?


Further inspection of the SQL and Unicode standards leads me to conclude that the '$' character is not allowed in standard SQL identifiers (at least using the SQL:2003 standard).


The '$' character is an unicode category Sc (Symbol, currency) character. The SQL:2003 standard says that the initial character in an identifier must be from the unicode categories Lu, Ll, Lt, Lm, Lo, or Nl, and that the following characters must be from these categories or the additioanl categories Mn, Mc, Nd, Pc, or Cf, or the character "Middle Dot" (U+00B7).

Therefore, SQLite is standard compliant as it stands. However, it could safely allow the extension of accepting the '$' character after the initial character in an identifier (which seems to be common with other database systems). This would still allow identifiers with an initial '$' character to be used as TCL parameters.

For the curious, ideographic characters in unicode are characters from the CJKV (Chinese, Japanese, Korean, and Vietnamese) ideographic languages.

Dennis Cote





Reply via email to