Commit 4a4341e7 authored by zYne's avatar zYne

added reserved keyword array to pgsql datadict

parent f94d3e47
...@@ -19,17 +19,319 @@ ...@@ -19,17 +19,319 @@
* <http://www.phpdoctrine.com>. * <http://www.phpdoctrine.com>.
*/ */
/** /**
* @package Doctrine * @package Doctrine
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @author Konsta Vesterinen <kvesteri@cc.hut.fi> * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Paul Cooper <pgc@ucecom.com> * @author Paul Cooper <pgc@ucecom.com>
* @author Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) * @author Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library)
* @version $Revision$ * @version $Revision$
* @category Object Relational Mapping * @category Object Relational Mapping
* @link www.phpdoctrine.com * @link www.phpdoctrine.com
* @since 1.0 * @since 1.0
*/ */
class Doctrine_DataDict_Pgsql extends Doctrine_DataDict { class Doctrine_DataDict_Pgsql extends Doctrine_DataDict {
/**
* @param array $reservedKeyWords an array of reserved keywords by pgsql
*/
protected static $reservedKeyWords = array(
'abort',
'absolute',
'access',
'action',
'add',
'after',
'aggregate',
'all',
'alter',
'analyse',
'analyze',
'and',
'any',
'as',
'asc',
'assertion',
'assignment',
'at',
'authorization',
'backward',
'before',
'begin',
'between',
'bigint',
'binary',
'bit',
'boolean',
'both',
'by',
'cache',
'called',
'cascade',
'case',
'cast',
'chain',
'char',
'character',
'characteristics',
'check',
'checkpoint',
'class',
'close',
'cluster',
'coalesce',
'collate',
'column',
'comment',
'commit',
'committed',
'constraint',
'constraints',
'conversion',
'convert',
'copy',
'create',
'createdb',
'createuser',
'cross',
'current_date',
'current_time',
'current_timestamp',
'current_user',
'cursor',
'cycle',
'database',
'day',
'deallocate',
'dec',
'decimal',
'declare',
'default',
'deferrable',
'deferred',
'definer',
'delete',
'delimiter',
'delimiters',
'desc',
'distinct',
'do',
'domain',
'double',
'drop',
'each',
'else',
'encoding',
'encrypted',
'end',
'escape',
'except',
'exclusive',
'execute',
'exists',
'explain',
'external',
'extract',
'false',
'fetch',
'float',
'for',
'force',
'foreign',
'forward',
'freeze',
'from',
'full',
'function',
'get',
'global',
'grant',
'group',
'handler',
'having',
'hour',
'ilike',
'immediate',
'immutable',
'implicit',
'in',
'increment',
'index',
'inherits',
'initially',
'inner',
'inout',
'input',
'insensitive',
'insert',
'instead',
'int',
'integer',
'intersect',
'interval',
'into',
'invoker',
'is',
'isnull',
'isolation',
'join',
'key',
'lancompiler',
'language',
'leading',
'left',
'level',
'like',
'limit',
'listen',
'load',
'local',
'localtime',
'localtimestamp',
'location',
'lock',
'match',
'maxvalue',
'minute',
'minvalue',
'mode',
'month',
'move',
'names',
'national',
'natural',
'nchar',
'new',
'next',
'no',
'nocreatedb',
'nocreateuser',
'none',
'not',
'nothing',
'notify',
'notnull',
'null',
'nullif',
'numeric',
'of',
'off',
'offset',
'oids',
'old',
'on',
'only',
'operator',
'option',
'or',
'order',
'out',
'outer',
'overlaps',
'overlay',
'owner',
'partial',
'password',
'path',
'pendant',
'placing',
'position',
'precision',
'prepare',
'primary',
'prior',
'privileges',
'procedural',
'procedure',
'read',
'real',
'recheck',
'references',
'reindex',
'relative',
'rename',
'replace',
'reset',
'restrict',
'returns',
'revoke',
'right',
'rollback',
'row',
'rule',
'schema',
'scroll',
'second',
'security',
'select',
'sequence',
'serializable',
'session',
'session_user',
'set',
'setof',
'share',
'show',
'similar',
'simple',
'smallint',
'some',
'stable',
'start',
'statement',
'statistics',
'stdin',
'stdout',
'storage',
'strict',
'substring',
'sysid',
'table',
'temp',
'template',
'temporary',
'then',
'time',
'timestamp',
'to',
'toast',
'trailing',
'transaction',
'treat',
'trigger',
'trim',
'true',
'truncate',
'trusted',
'type',
'unencrypted',
'union',
'unique',
'unknown',
'unlisten',
'until',
'update',
'usage',
'user',
'using',
'vacuum',
'valid',
'validator',
'values',
'varchar',
'varying',
'verbose',
'version',
'view',
'volatile',
'when',
'where',
'with',
'without',
'work',
'write',
'year',
'zone'
);
/** /**
* Obtain DBMS specific SQL code portion needed to declare an text type * Obtain DBMS specific SQL code portion needed to declare an text type
* field to be used in statements like CREATE TABLE. * field to be used in statements like CREATE TABLE.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment