Hi Andy, I wonder, what are your expectations in such scenario? If you are looking for a way to shoot yourself in the foot, I am sure H2 will present multiple opportunities for that. Does it really matter if it end up with "table not found" or will select from one or the other table, at random? Of course, you are always welcome to try...
On Saturday, January 14, 2023 at 10:38:13 PM UTC-5 AndyGo wrote: > Thanks. Appreciate the quick and comprehensive response. Can you explain > this a bit more: "It is possible to specify them in the default Regular > compatibility mode " > > Just curious, since the settings can't persist... what would happen if, in > default mode, I created MyTable and also "mytable" and then later, > connected with CASE_INSENSITIVE_IDENTIFIERS and queried SELECT * FROM > MYTABLE ? > > On Friday, January 13, 2023 at 2:12:31 AM UTC-8 Evgenij Ryazanov wrote: > >> Hello! >> >> These settings aren't related to each other. >> >> IGNORE_CASE is about *data types* and their *values*. It replaces CHARACTER >> VARYING (VARCHAR) columns in DDL commands with VARCHAR_IGNORECASE data >> type. This legacy setting should never be used, it is much better to >> specify some case-insensitive database collation if you need it. >> >> DATABASE_TO_UPPER, DATABASE_TO_LOWER, and CASE_INSENSITIVE_IDENTIFIERS >> settings change treatment of *identifiers*. H2 by default is fully >> compliant with the SQL Standard here. It means all unquoted identifiers are >> converted to upper case. id, ID, Id, "ID" (and also non-standard >> MySQL-style `ID` and `id`) are equal to each other, but "id" is an >> another identifier. Some other database systems historically process >> identifiers in their own special way and sometimes this way also depends on >> their environment. That's why these settings can be set separately from >> compatibility modes. Values of these settings, however, aren't persisted >> and you must always specify them with the same values in JDBC URL. >> >> It is possible to specify them in the default Regular compatibility mode >> too, but, again, the default behavior is already correct and compliant with >> the Standard. >> > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/3d6ca12e-19f4-43f9-884b-23e3b28661d5n%40googlegroups.com.
