Index: pages/changes.in ================================================================== --- pages/changes.in +++ pages/changes.in @@ -20,10 +20,17 @@ set xrefChng($date) $nChng incr nChng } chng {2019-07-00 (3.29.0)} { +
  • The [double-quoted string literal] misfeature is deactivated by default + for DDL statements. It can be reactivated if needed, to support legacy + applications, using the [SQLITE_DBCONFIG_DQS_DDL] action of the + [sqlite3_db_config()] interface. +
  • Added the [SQLITE_DBCONFIG_DQS_DML] action to [sqlite3_db_config()] that + will disable the [double-quoted string literal] misfeature for DML + statements.
  • Improved optimization of AND and OR operators when one or the other operand is a constant.
  • Added the "[https://sqlite.org/src/file/ext/misc/dbdata.c|sqlite_dbdata]" virtual table for extracting raw low-level content from an SQLite database, even a database that is corrupt. @@ -31,10 +38,11 @@
    1. Add the ".recover" command which tries to recover as much content as possible from a corrupt database file.
    2. Add the ".filectrl" command useful for testing.
    3. Add the long-standing ".testctrl" command to the ".help" menu. +
    4. Added the ".dbconfig" command
    } chng {2019-04-16 (3.28.0)} {
  • Enhanced [window functions]: Index: pages/lang.in ================================================================== --- pages/lang.in +++ pages/lang.in @@ -121,11 +121,12 @@

    SQLite supports a limited subset of ALTER TABLE. The ALTER TABLE command in SQLite allows the user to rename a table, to rename a column within a table, or to add a new column to an existing table. -hd_fragment altertabrename {ALTER TABLE RENAME} {rename table} +hd_fragment altertabrename {ALTER TABLE RENAME} {rename table} \ + {ALTER TABLE RENAME documentation}

    ALTER TABLE RENAME

    ^(The RENAME TO syntax changes the name of table-name to new-table-name.)^ This command @@ -140,11 +141,13 @@ in versions 3.25.0 ([dateof:3.25.0]) and 3.26.0 ([dateof:3.26.0]) in order to carry the rename operation forward into triggers and views that reference the renamed table. This is considered an improvement. Applications that depend on the older (and arguably buggy) behavior can use the -[PRAGMA legacy_alter_table=ON] statement to make ALTER TABLE RENAME +[PRAGMA legacy_alter_table=ON] statement or the +[SQLITE_DBCONFIG_LEGACY_ALTER_TABLE] configuration parameter +on [sqlite3_db_config()] interface to make ALTER TABLE RENAME behave as it did prior to version 3.25.0.

    Beginning with release 3.25.0 ([dateof:3.25.0]), references to the table Index: pages/pragma.in ================================================================== --- pages/pragma.in +++ pages/pragma.in @@ -818,10 +818,13 @@ New applications should leave this flag turned off.

    For compatibility with older [virtual table] implementations, this flag is turned on temporarily while the [sqlite3_module.xRename] method is being run. The value of this flag is restore after the [sqlite3_module.xRename] method finishes. +

    The legacy alter table behavior can also be toggled on and off + using the [SQLITE_DBCONFIG_LEGACY_ALTER_TABLE] option to the + [sqlite3_db_config()] interface. } Pragma legacy_file_format {

    ^(PRAGMA legacy_file_format;
    PRAGMA legacy_file_format = boolean

    Index: pages/quirks.in ================================================================== --- pages/quirks.in +++ pages/quirks.in @@ -234,36 +234,57 @@ hd_fragment dblquote {double-quoted string literal}

    Double-quoted String Literals Are Accepted

    -The SQL standard says that one should use double-quotes around identifiers -and single-quotes around string literals. +The SQL standard requires double-quotes around identifiers +and single-quotes around string literals. For example:

    SQLite accepts both of the above. But, in an effort to be compatible -with MySQL 3.x (which was very popular when SQLite was first being -designed) SQLite will also use content contained in double-quotes as a s -tring literal if the content does not match any valid identifier. +with MySQL 3.x (which was one of the most widely used RDBMSes +when SQLite was first being designed) SQLite will also interpret +a double-quotes string as +string literal if it does not match any valid identifier.

    -An unfortunate side-effect of this is that a misspelled double-quoted +This misfeature means that a misspelled double-quoted identifier will be interpreted as a string literal, rather than generating an error. -Another problem is that this behavior allows developers who are new to -the SQL language to continue using double-quoted string literals when they +It also lures developers who are new to the SQL language into +bad habit of using double-quoted string literals when they really need to learn to use the correct single-quoted string literal form.

    In hindsight, we should not have tried to make SQLite accept MySQL 3.x syntax, and should have never allowed double-quoted string literals. -However, we continue to support that capability to avoid breaking legacy -applications. +However, there are countless applications that make use of +double-quoted string literals and so we continue to support +that capability to avoid breaking legacy.

    -Update: As of SQLite 3.27.0 ([dateof:3.27.0]) the use of a double-quoted +Updates: +

    Keywords Can Often Be Used As Identifiers

    The SQL language is rich in keywords.