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

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

index 6a48e5461a09b1937fcbe9e18b873d993144cf85..e9e2599bad382dbbfdd84ed48309b209eff8734a 100644 (file)
@@ -141,114 +141,22 @@ class XMLDBpostgres7 extends XMLDBgenerator {
      */
     function getReservedWords() {
     /// This file contains the reserved words for PostgreSQL databases
-    /// from http://www.postgresql.org/docs/7.3/static/sql-keywords-appendix.html
+    /// http://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
         $reserved_words = array (
-            'abort', 'abs', 'absolute', 'access', 'action', 'ada',
-            'add', 'admin', 'after', 'aggregate', 'alias', 'all',
-            'allocate', 'alter', 'analyse', 'analyze', 'and', 'any',
-            'are', 'array', 'as', 'asc', 'asensitive', 'assertion',
-            'assignment', 'asymmetric', 'at', 'atomic',
-            'authorization', 'avg', 'backward', 'before', 'begin',
-            'between', 'bigint', 'binary', 'bit', 'bitvar',
-            'bit_length', 'blob', 'boolean', 'both', 'breadth', 'by',
-            'c', 'cache', 'call', 'called', 'cardinality', 'cascade',
-            'cascaded', 'case', 'cast', 'catalog', 'catalog_name',
-            'chain', 'char', 'character', 'characteristics',
-            'character_length', 'character_set_catalog',
-            'character_set_name', 'character_set_schema',
-            'char_length', 'check', 'checked', 'checkpoint', 'class',
-            'class_origin', 'clob', 'close', 'cluster', 'coalesce',
-            'cobol', 'collate', 'collation', 'collation_catalog',
-            'collation_name', 'collation_schema', 'column',
-            'column_name', 'command_function',
-            'command_function_code', 'comment', 'commit', 'committed',
-            'completion', 'condition_number', 'connect', 'connection',
-            'connection_name', 'constraint', 'constraints',
-            'constraint_catalog', 'constraint_name',
-            'constraint_schema', 'constructor', 'contains', 'continue',
-            'conversion', 'convert', 'copy', 'corresponding', 'count',
-            'create', 'createdb', 'createuser', 'cross', 'cube', 'current',
-            'current_date', 'current_path', 'current_role',
-            'current_time', 'current_timestamp', 'current_user',
-            'cursor', 'cursor_name', 'cycle', 'data', 'database', 'date',
-            'datetime_interval_code', 'datetime_interval_precision',
-            'day', 'deallocate', 'dec', 'decimal', 'declare', 'default',
-            'deferrable', 'deferred', 'defined', 'definer', 'delete',
-            'delimiter', 'delimiters', 'depth', 'deref', 'desc', 'describe',
-            'descriptor', 'destroy', 'destructor', 'deterministic',
-            'diagnostics', 'dictionary', 'disconnect', 'dispatch',
-            'distinct', 'do', 'domain', 'double', 'drop', 'dynamic',
-            'dynamic_function', 'dynamic_function_code', 'each', 'else',
-            'encoding', 'encrypted', 'end', 'end-exec', 'equals', 'escape',
-            'every', 'except', 'exception', 'exclusive', 'exec', 'execute',
-            'existing', 'exists', 'explain', 'external', 'extract', 'false',
-            'fetch', 'final', 'first', 'float', 'for', 'force', 'foreign',
-            'fortran', 'forward', 'found', 'free', 'freeze', 'from', 'full',
-            'function', 'g', 'general', 'generated', 'get', 'global', 'go',
-            'goto', 'grant', 'granted', 'group', 'grouping', 'handler',
-            'having', 'hierarchy', 'hold', 'host', 'hour', 'identity',
-            'ignore', 'ilike', 'immediate', 'immutable', 'implementation',
-            'implicit', 'in', 'increment', 'index', 'indicator', 'infix',
-            'inherits', 'initialize', 'initially', 'inner', 'inout',
-            'input', 'insensitive', 'insert', 'instance', 'instantiable',
-            'instead', 'int', 'integer', 'intersect', 'interval', 'into',
-            'invoker', 'is', 'isnull', 'isolation', 'iterate', 'join', 'k',
-            'key', 'key_member', 'key_type', 'lancompiler', 'language',
-            'large', 'last', 'lateral', 'leading', 'left', 'length', 'less',
-            'level', 'like', 'limit', 'listen', 'load', 'local', 'localtime',
-            'localtimestamp', 'location', 'locator', 'lock', 'lower', 'm',
-            'map', 'match', 'max', 'maxvalue', 'message_length',
-            'message_octet_length', 'message_text', 'method', 'min',
-            'minute', 'minvalue', 'mod', 'mode', 'modifies', 'modify',
-            'module', 'month', 'more', 'move', 'mumps', 'name', 'names',
-            'national', 'natural', 'nchar', 'nclob', 'new', 'next', 'no',
-            'nocreatedb', 'nocreateuser', 'none', 'not', 'nothing',
-            'notify', 'notnull', 'null', 'nullable', 'nullif', 'number',
-            'numeric', 'object', 'octet_length', 'of', 'off', 'offset', 'oids',
-            'old', 'on', 'only', 'open', 'operation', 'operator', 'option',
-            'options', 'or', 'order', 'ordinality', 'out', 'outer', 'output',
-            'overlaps', 'overlay', 'overriding', 'owner', 'pad',
-            'parameter', 'parameters', 'parameter_mode',
-            'parameter_name', 'parameter_ordinal_position',
-            'parameter_specific_catalog', 'parameter_specific_name',
-            'parameter_specific_schema', 'partial', 'pascal',
-            'password', 'path', 'pendant', 'placing', 'pli', 'position',
-            'postfix', 'precision', 'prefix', 'preorder', 'prepare',
-            'preserve', 'primary', 'prior', 'privileges', 'procedural',
-            'procedure', 'public', 'read', 'reads', 'real', 'recheck',
-            'recursive', 'ref', 'references', 'referencing', 'reindex',
-            'relative', 'rename', 'repeatable', 'replace', 'reset',
-            'restrict', 'result', 'return', 'returned_length',
-            'returned_octet_length', 'returned_sqlstate', 'returns',
-            'revoke', 'right', 'role', 'rollback', 'rollup', 'routine',
-            'routine_catalog', 'routine_name', 'routine_schema', 'row',
-            'rows', 'row_count', 'rule', 'savepoint', 'scale', 'schema',
-            'schema_name', 'scope', 'scroll', 'search', 'second', 'section',
-            'security', 'select', 'self', 'sensitive', 'sequence',
-            'serializable', 'server_name', 'session', 'session_user',
-            'set', 'setof', 'sets', 'share', 'show', 'similar', 'simple', 'size',
-            'smallint', 'some', 'source', 'space', 'specific',
-            'specifictype', 'specific_name', 'sql', 'sqlcode', 'sqlerror',
-            'sqlexception', 'sqlstate', 'sqlwarning', 'stable', 'start',
-            'state', 'statement', 'static', 'statistics', 'stdin', 'stdout',
-            'storage', 'strict', 'structure', 'style', 'subclass_origin',
-            'sublist', 'substring', 'sum', 'symmetric', 'sysid', 'system',
-            'system_user', 'table', 'table_name', 'temp', 'template',
-            'temporary', 'terminate', 'than', 'then', 'time', 'timestamp',
-            'timezone_hour', 'timezone_minute', 'to', 'toast', 'trailing',
-            'transaction', 'transactions_committed',
-            'transactions_rolled_back', 'transaction_active',
-            'transform', 'transforms', 'translate', 'translation',
-            'treat', 'trigger', 'trigger_catalog', 'trigger_name',
-            'trigger_schema', 'trim', 'true', 'truncate', 'trusted', 'type',
-            'uncommitted', 'under', 'unencrypted', 'union', 'unique',
-            'unknown', 'unlisten', 'unnamed', 'unnest', 'until', 'update',
-            'upper', 'usage', 'user', 'user_defined_type_catalog',
-            'user_defined_type_name', 'user_defined_type_schema',
-            'using', 'vacuum', 'valid', 'validator', 'value', 'values',
-            'varchar', 'variable', 'varying', 'verbose', 'version', 'view',
-            'volatile', 'when', 'whenever', 'where', 'with', 'without', 'work',
-            'write', 'year', 'zone'
+            'all', 'analyse', 'analyze', 'and', 'any', 'array', 'as', 'asc', 
+            'asymmetric', 'authorization', 'between', 'binary', 'both', 'case', 
+            'cast', 'check', 'collate', 'column', 'constraint', 'create', 'cross', 
+            'current_date', 'current_role', 'current_time', 'current_timestamp', 
+            'current_user', 'default', 'deferrable', 'desc', 'distinct', 'do', 
+            'else', 'end', 'except', 'false', 'for', 'foreign', 'freeze', 'from', 
+            'full', 'grant', 'group', 'having', 'ilike', 'in', 'initially', 'inner', 
+            'intersect', 'into', 'is', 'isnull', 'join', 'leading', 'left', 'like', 
+            'limit', 'localtime', 'localtimestamp', 'natural', 'new', 'not', 
+            'notnull', 'null', 'off', 'offset', 'old', 'on', 'only', 'or', 'order', 
+            'outer', 'overlaps', 'placing', 'primary', 'references', 'right', 'select', 
+            'session_user', 'similar', 'some', 'symmetric', 'table', 'then', 'to', 
+            'trailing', 'true', 'union', 'unique', 'user', 'using', 'verbose', 
+            'when', 'where'
         );  
         return $reserved_words;
     }