]> git.mjollnir.org Git - moodle.git/commitdiff
Reducing the list of MSSQL reserved words to the efectively
authorstronk7 <stronk7>
Mon, 21 Aug 2006 12:28:46 +0000 (12:28 +0000)
committerstronk7 <stronk7>
Mon, 21 Aug 2006 12:28:46 +0000 (12:28 +0000)
reserved words (the previous list included a lot of words
reserved by SQLXX standars but not by MSSQL)

lib/xmldb/classes/generators/mssql/mssql.class.php

index 7d99cf130f0bd91cf595f4f526b3d02559baee15..3172075a4304942274b713f0374feda191b23304 100644 (file)
@@ -133,64 +133,37 @@ class XMLDBmssql extends XMLDBgenerator {
      */
     function getReservedWords() {
     /// This file contains the reserved words for MSSQL databases
-    /// from http://msdn.microsoft.com/library/en-us/tsqlref/ts_ra-rz_9oj7.asp
+    /// from http://msdn2.microsoft.com/en-us/library/ms189822.aspx
         $reserved_words = array (
-            'absolute', 'action', 'ada', 'add', 'admin', 'after', 'aggregate',
-            'alias', 'all', 'allocate', 'alter', 'and', 'any', 'are', 'array', 'as',
-            'asc', 'assertion', 'at', 'authorization', 'avg', 'backup', 'before',
-            'begin', 'between', 'binary', 'bit', 'bit_length', 'blob', 'boolean',
-            'both', 'breadth', 'break', 'browse', 'bulk', 'by', 'call', 'cascade',
-            'cascaded', 'case', 'cast', 'catalog', 'char', 'character',
-            'character_length', 'char_length', 'check', 'checkpoint', 'class',
-            'clob', 'close', 'clustered', 'coalesce', 'collate', 'collation',
-            'column', 'commit', 'completion', 'compute', 'connect',
-            'connection', 'constraint', 'constraints', 'constructor', 'contains',
-            'containstable', 'continue', 'convert', 'corresponding', 'count',
-            'create', 'cross', 'cube', 'current', 'current_date', 'current_path',
-            'current_role', 'current_time', 'current_timestamp', 'current_user',
-            'cursor', 'cycle', 'data', 'database', 'date', 'day', 'dbcc', 'deallocate',
-            'dec', 'decimal', 'declare', 'default', 'deferrable', 'deferred', 'delete',
-            'deny', 'depth', 'deref', 'desc', 'describe', 'descriptor', 'destroy',
-            'destructor', 'deterministic', 'diagnostics', 'dictionary', 'disconnect',
-            'disk', 'distinct', 'distributed', 'domain', 'double', 'drop', 'dummy',
-            'dump', 'dynamic', 'each', 'else', 'end', 'end-exec', 'equals', 'errlvl',
-            'escape', 'every', 'except', 'exception', 'exec', 'execute', 'exists',
-            'exit', 'external', 'extract', 'false', 'fetch', 'file', 'fillfactor', 'first',
-            'float', 'for', 'foreign', 'fortran', 'found', 'free', 'freetext', 'freetexttable',
-            'from', 'full', 'function', 'general', 'get', 'global', 'go', 'goto', 'grant',
-            'group', 'grouping', 'having', 'holdlock', 'host', 'hour', 'identity',
-            'identitycol', 'identity_insert', 'if', 'ignore', 'immediate', 'in',
-            'include', 'index', 'indicator', 'initialize', 'initially', 'inner', 'inout',
-            'input', 'insensitive', 'insert', 'int', 'integer', 'intersect', 'interval',
-            'into', 'is', 'isolation', 'iterate', 'join', 'key', 'kill', 'language', 'large',
-            'last', 'lateral', 'leading', 'left', 'less', 'level', 'like', 'limit', 'lineno',
-            'load', 'local', 'localtime', 'localtimestamp', 'locator', 'lower', 'map',
-            'match', 'max', 'min', 'minute', 'modifies', 'modify', 'module', 'month',
-            'names', 'national', 'natural', 'nchar', 'nclob', 'new', 'next', 'no',
-            'nocheck', 'nonclustered', 'none', 'not', 'null', 'nullif', 'numeric',
-            'object', 'octet_length', 'of', 'off', 'offsets', 'old', 'on', 'only', 'open',
-            'opendatasource', 'openquery', 'openrowset', 'openxml', 'operation',
-            'option', 'or', 'order', 'ordinality', 'out', 'outer', 'output', 'over',
-            'overlaps', 'pad', 'parameter', 'parameters', 'partial', 'pascal', 'path',
-            'percent', 'plan', 'position', 'postfix', 'precision', 'prefix', 'preorder',
-            'prepare', 'preserve', 'primary', 'print', 'prior', 'privileges', 'proc',
-            'procedure', 'public', 'raiserror', 'read', 'reads', 'readtext', 'real',
-            'reconfigure', 'recursive', 'ref', 'references', 'referencing', 'relative',
-            'replication', 'restore', 'restrict', 'result', 'return', 'returns', 'revoke',
-            'right', 'role', 'rollback', 'rollup', 'routine', 'row', 'rowcount', 'rowguidcol',
-            'rows', 'rule', 'save', 'savepoint', 'schema', 'scope', 'scroll', 'search',
-            'second', 'section', 'select', 'sequence', 'session', 'session_user', 'set',
-            'sets', 'setuser', 'shutdown', 'size', 'smallint', 'some', 'space', 'specific',
-            'specifictype', 'sql', 'sqlca', 'sqlcode', 'sqlerror', 'sqlexception', 'sqlstate',
-            'sqlwarning', 'start', 'state', 'statement', 'static', 'statistics', 'structure',
-            'substring', 'sum', 'system_user', 'table', 'temporary', 'terminate', 'textsize',
-            'than', 'then', 'time', 'timestamp', 'timezone_hour', 'timezone_minute',
-            'to', 'top', 'trailing', 'tran', 'transaction', 'translate', 'translation', 'treat',
-            'trigger', 'trim', 'true', 'truncate', 'tsequal', 'under', 'union', 'unique',
-            'unknown', 'unnest', 'update', 'updatetext', 'upper', 'usage', 'use', 'user',
-            'using', 'value', 'values', 'varchar', 'variable', 'varying', 'view', 'waitfor',
-            'when', 'whenever', 'where', 'while', 'with', 'without', 'work', 'write',
-            'writetext', 'year', 'zone'
+            'add', 'all', 'alter', 'and', 'any', 'as', 'asc', 'authorization', 
+            'avg', 'backup', 'begin', 'between', 'break', 'browse', 'bulk', 
+            'by', 'cascade', 'case', 'check', 'checkpoint', 'close', 'clustered', 
+            'coalesce', 'collate', 'column', 'commit', 'committed', 'compute', 
+            'confirm', 'constraint', 'contains', 'containstable', 'continue', 
+            'controlrow', 'convert', 'count', 'create', 'cross', 'current', 
+            'current_date', 'current_time', 'current_timestamp', 'current_user', 
+            'cursor', 'database', 'dbcc', 'deallocate', 'declare', 'default', 'delete', 
+            'deny', 'desc', 'disk', 'distinct', 'distributed', 'double', 'drop', 'dummy', 
+            'dump', 'else', 'end', 'errlvl', 'errorexit', 'escape', 'except', 'exec', 
+            'execute', 'exists', 'exit', 'fetch', 'file', 'fillfactor', 'floppy', 
+            'for', 'foreign', 'freetext', 'freetexttable', 'from', 'full', 'function', 
+            'goto', 'grant', 'group', 'having', 'holdlock', 'identity', 'identitycol', 
+            'identity_insert', 'if', 'in', 'index', 'inner', 'insert', 'intersect', 'into', 
+            'is', 'isolation', 'join', 'key', 'kill', 'left', 'level', 'like', 'lineno', 
+            'load', 'max', 'min', 'mirrorexit', 'national', 'nocheck', 'nonclustered', 
+            'not', 'null', 'nullif', 'of', 'off', 'offsets', 'on', 'once', 'only', 'open', 
+            'opendatasource', 'openquery', 'openrowset', 'openxml', 'option', 'or', 'order', 
+            'outer', 'over', 'percent', 'perm', 'permanent', 'pipe', 'plan', 'precision', 
+            'prepare', 'primary', 'print', 'privileges', 'proc', 'procedure', 'processexit', 
+            'public', 'raiserror', 'read', 'readtext', 'reconfigure', 'references', 
+            'repeatable', 'replication', 'restore', 'restrict', 'return', 'revoke', 
+            'right', 'rollback', 'rowcount', 'rowguidcol', 'rule', 'save', 'schema', 
+            'select', 'serializable', 'session_user', 'set', 'setuser', 'shutdown', 'some', 
+            'statistics', 'sum', 'system_user', 'table', 'tape', 'temp', 'temporary', 
+            'textsize', 'then', 'to', 'top', 'tran', 'transaction', 'trigger', 'truncate', 
+            'tsequal', 'uncommitted', 'union', 'unique', 'update', 'updatetext', 'use', 
+            'user', 'values', 'varying', 'view', 'waitfor', 'when', 'where', 'while', 
+            'with', 'work', 'writetext'
         );  
         return $reserved_words;
     }