/ Check-in [d03d4805]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change the documentation to be more specific about the restriction on the use of keywords. Ticket #2264. (CVS 3676)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:d03d480544e1f782ca796e4cfb83ff6894ed9147
User & Date: drh 2007-03-08 12:23:34
Context
2007-03-09
14:40
Add a few "class" attributes to the html generated by lang.tcl to support conversion to pdf. (CVS 3677) check-in: 485c52dd user: danielk1977 tags: trunk
2007-03-08
12:23
Change the documentation to be more specific about the restriction on the use of keywords. Ticket #2264. (CVS 3676) check-in: d03d4805 user: drh tags: trunk
2007-03-06
16:03
Catch an out-of-memory condition in vacuum code. (Bug in (3373)). (CVS 3675) check-in: 302ec768 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to www/lang.tcl.

     1      1   #
     2      2   # Run this Tcl script to generate the lang-*.html files.
     3      3   #
     4         -set rcsid {$Id: lang.tcl,v 1.122 2007/02/13 02:03:25 drh Exp $}
            4  +set rcsid {$Id: lang.tcl,v 1.123 2007/03/08 12:23:34 drh Exp $}
     5      5   source common.tcl
     6      6   
     7      7   if {[llength $argv]>0} {
     8      8     set outputdir [lindex $argv 0]
     9      9   } else {
    10     10     set outputdir ""
    11     11   }
................................................................................
  1861   1861   }
  1862   1862   
  1863   1863   # A list of keywords.  A asterisk occurs after the keyword if it is on
  1864   1864   # the fallback list.
  1865   1865   #
  1866   1866   set keyword_list [lsort {
  1867   1867      ABORT*
         1868  +   ADD
  1868   1869      AFTER*
  1869   1870      ALL
  1870   1871      ALTER
         1872  +   ANALYZE*
  1871   1873      AND
  1872   1874      AS
  1873   1875      ASC*
  1874   1876      ATTACH*
  1875   1877      AUTOINCREMENT
  1876   1878      BEFORE*
  1877   1879      BEGIN*
  1878   1880      BETWEEN
  1879   1881      BY
  1880   1882      CASCADE*
  1881   1883      CASE
         1884  +   CAST*
  1882   1885      CHECK
  1883   1886      COLLATE
  1884   1887      COMMIT
  1885   1888      CONFLICT*
  1886   1889      CONSTRAINT
  1887   1890      CREATE
  1888   1891      CROSS
................................................................................
  1909   1912      FOR*
  1910   1913      FOREIGN
  1911   1914      FROM
  1912   1915      FULL
  1913   1916      GLOB*
  1914   1917      GROUP
  1915   1918      HAVING
         1919  +   IF*
  1916   1920      IGNORE*
  1917   1921      IMMEDIATE*
  1918   1922      IN
  1919   1923      INDEX
  1920   1924      INITIALLY*
  1921   1925      INNER
  1922   1926      INSERT
................................................................................
  1937   1941      NULL
  1938   1942      OF*
  1939   1943      OFFSET*
  1940   1944      ON
  1941   1945      OR
  1942   1946      ORDER
  1943   1947      OUTER
         1948  +   PLAN*
  1944   1949      PRAGMA*
  1945   1950      PRIMARY
         1951  +   QUERY*
  1946   1952      RAISE*
  1947   1953      REFERENCES
  1948   1954      REINDEX*
  1949   1955      RENAME*
  1950   1956      REPLACE*
  1951   1957      RESTRICT*
  1952   1958      RIGHT
................................................................................
  1965   1971      UNION
  1966   1972      UNIQUE
  1967   1973      UPDATE
  1968   1974      USING
  1969   1975      VACUUM*
  1970   1976      VALUES
  1971   1977      VIEW*
         1978  +   VIRTUAL*
  1972   1979      WHEN
  1973   1980      WHERE
  1974   1981   }]
  1975   1982   
  1976   1983   
  1977   1984   
  1978   1985   Section {SQLite keywords} keywords
  1979   1986   
  1980   1987   puts {
  1981   1988   <p>The SQL standard specifies a huge number of keywords which may not
  1982         -be used as the names of tables, indices, columns, or databases.  The
  1983         -list is so long that few people can remember them all.  For most SQL
  1984         -code, your safest bet is to never use any English language word as the
  1985         -name of a user-defined object.</p>
         1989  +be used as the names of tables, indices, columns, databases, user-defined
         1990  +functions, collations, virtual table modules, or any other named object.
         1991  +The list of keywords is so long that few people can remember them all.
         1992  +For most SQL code, your safest bet is to never use any English language
         1993  +word as the name of a user-defined object.</p>
  1986   1994   
  1987   1995   <p>If you want to use a keyword as a name, you need to quote it.  There
  1988   1996   are three ways of quoting keywords in SQLite:</p>
  1989   1997   
  1990   1998   <p>
  1991   1999   <blockquote>
  1992   2000   <table>
................................................................................
  2005   2013           compatibility.</td></tr>
  2006   2014   </table>
  2007   2015   </blockquote>
  2008   2016   </p>
  2009   2017   
  2010   2018   <p>Quoted keywords are unaesthetic.
  2011   2019   To help you avoid them, SQLite allows many keywords to be used unquoted
  2012         -as the names of databases, tables, indices, triggers, views, and/or columns.
         2020  +as the names of databases, tables, indices, triggers, views, columns,
         2021  +user-defined functions, collations, attached databases, and virtual
         2022  +function modules.
  2013   2023   In the list of keywords that follows, those that can be used as identifiers
  2014   2024   are shown in an italic font.  Keywords that must be quoted in order to be
  2015   2025   used as identifiers are shown in bold.</p>
  2016   2026   
  2017   2027   <p>
  2018   2028   SQLite adds new keywords from time to time when it take on new features.
  2019         -So to prevent you code from being broken by future enhancements, you should
         2029  +So to prevent your code from being broken by future enhancements, you should
  2020   2030   normally quote any indentifier that is an English language word, even if
  2021   2031   you do not have to.
  2022   2032   </p>
  2023   2033   
  2024   2034   <p>
  2025   2035   The following are the keywords currently recognized by SQLite:
  2026   2036   </p>