db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mamta A. Satoor (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-761) The reserved words list in the reference manual doesn't look uptodate
Date Fri, 03 Feb 2006 19:23:09 GMT
    [ http://issues.apache.org/jira/browse/DERBY-761?page=comments#action_12365110 ] 

Mamta A. Satoor commented on DERBY-761:
---------------------------------------

I am glad you are looking at the list too. I was surprised to see D and T in the TOKEN reserved
words list. Here is what I see in sqlgrammar.jj 
/*
	This list should contain only and all SQL92 keywords that are reserved.
	Reserved keywords can be used as identifiers in the language only
	as delimited identifiers.
 */
/* NOTE - If you add a keyword, then you must add it to reservedKeyword()
 *	      or nonReservedKeyword() as well!
 */
TOKEN [IGNORE_CASE] :
{	/* SQL92 reserved Keywords */
	<ADD: "add">
|	<ALL: "all">
|	<ALLOCATE: "allocate">
|	<ALTER: "alter">
|	<AND: "and">
|	<ANY: "any">
|	<ARE: "are">
|	<AS: "as">
|	<ASC: "asc">
|	<ASSERTION: "assertion">
|	<AT: "at">
|	<AUTHORIZATION: "authorization">
|	<AVG: "avg">
|	<BEGIN: "begin">
|	<BETWEEN: "between">
|	<BINARY: "binary">
|	<BIT: "bit">
|	<BOTH: "both">
|	<BY: "by">
|	<CASCADE: "cascade">
|	<CASCADED: "cascaded">
|	<CASE: "case">
|	<CAST: "cast">
|	<CHAR: "char">
|	<CHARACTER: "character">
|	<CHARACTER_LENGTH: "character_length">
|	<CHECK: "check">
|	<CLOSE: "close">
|	<COALESCE: "coalesce">
|	<COLLATE: "collate">
|	<COLLATION: "collation">
|	<COLUMN: "column">
|	<COMMIT: "commit">
|	<CONNECT: "connect">
|	<CONNECTION: "connection">
|	<CONSTRAINT: "constraint">
|	<CONSTRAINTS: "constraints">
|	<CONTINUE: "continue">
|	<CONVERT: "convert">
|	<CORRESPONDING: "corresponding">
|	<COUNT: "count">
|	<CREATE: "create">
|	<CURRENT: "current">
|	<CURRENT_DATE: "current_date">
|	<CURRENT_TIME: "current_time">
|	<CURRENT_TIMESTAMP: "current_timestamp">
|	<CURRENT_USER: "current_user">
|	<CURSOR: "cursor">
|	<D: "d">
|	<DEALLOCATE: "deallocate">
|	<DEC: "dec">
|	<DECIMAL: "decimal">
|	<DECLARE: "declare">
|	<_DEFAULT: "default">
|	<DEFERRABLE: "deferrable">
|	<DEFERRED: "deferred">
|	<DELETE: "delete">
|	<DESC: "desc">
|	<DESCRIBE: "describe">
|	<DIAGNOSTICS: "diagnostics">
|	<DISCONNECT: "disconnect">
|	<DISTINCT: "distinct">
|	<DOUBLE: "double">
|	<DROP: "drop">
|	<ELSE: "else">
|	<END: "end">
|	<ENDEXEC: "end-exec">
|	<ESCAPE: "escape">
|	<EXCEPT: "except">
|	<EXCEPTION: "exception">
|	<EXEC: "exec">
|	<EXECUTE: "execute">
|	<EXISTS: "exists">
|	<EXTERNAL: "external">
|	<FALSE: "false">
|	<FETCH: "fetch">
|	<FIRST: "first">
|	<FLOAT: "float">
|	<FOR: "for">
|	<FOREIGN: "foreign">
|	<FOUND: "found">
|	<FROM: "from">
|	<FULL: "full">
|	<FUNCTION: "function">
|	<GET: "get">
|	<GLOBAL: "global">
|	<GO: "go">
|	<GOTO: "goto">
|	<GRANT: "grant">
|	<GROUP: "group">
|	<HAVING: "having">
|	<HOUR: "hour">
|	<IDENTITY: "identity">
|	<IMMEDIATE: "immediate">
|	<IN: "in">
|	<INDICATOR: "indicator">
|	<INITIALLY: "initially">
|	<INNER: "inner">
|	<INPUT: "input">
|	<INSENSITIVE: "insensitive">
|	<INSERT: "insert">
|	<INT: "int">
|	<INTEGER: "integer">
|	<INTERSECT: "intersect">
|	<INTO: "into">
|	<IS: "is">
|	<ISOLATION: "isolation">
|	<JOIN: "join">
|	<KEY: "key">
|	<LAST: "last">
|	<LEFT: "left">
|	<LIKE: "like">
|	<LOWER: "lower">
|	<MATCH: "match">
|	<MAX: "max">
|	<MIN: "min">
|	<MINUTE: "minute">
|	<MODULE: "module">
|	<NATIONAL: "national">
|	<NATURAL: "natural">
|	<NCHAR: "nchar">
|	<NEXT: "next">
|	<NO: "no">
|	<NOT: "not">
|	<NULL: "null">
|	<NULLIF: "nullif">
|	<NUMERIC: "numeric">
|	<OF: "of">
|	<ON: "on">
|	<ONLY: "only">
|	<OPEN: "open">
|	<OPTION: "option">
|	<OR: "or">
|	<ORDER: "order">
|	<OUTER: "outer">
|	<OUTPUT: "output">
|	<OVERLAPS: "overlaps">
|	<PAD: "pad">
|	<PARTIAL: "partial">
|	<PREPARE: "prepare">
|	<PRESERVE: "preserve">
|	<PRIMARY: "primary">
|	<PRIOR: "prior">
|	<PRIVILEGES: "privileges">
|	<PROCEDURE: "procedure">
|	<PUBLIC: "public">
|	<READ: "read">
|	<REAL: "real">
|	<REFERENCES: "references">
|	<RELATIVE: "relative">
|	<RESTRICT: "restrict">
|	<REVOKE: "revoke">
|	<RIGHT: "right">
|	<ROLLBACK: "rollback">
|	<ROWS: "rows">
|	<SCHEMA: "schema">
|	<SCROLL: "scroll">
|	<SECOND: "second">
|	<SELECT: "select">
|	<SESSION_USER: "session_user">
|	<SET: "set">
|	<SMALLINT: "smallint">
|	<SOME: "some">
|	<SPACE: "space">
|	<SQL: "sql">
|	<SQLCODE: "sqlcode">
|	<SQLERROR: "sqlerror">
|	<SQLSTATE: "sqlstate">
|	<SUBSTRING: "substring">
|	<SUM: "sum">
|	<SYSTEM_USER: "system_user">
|	<T: "t">
|	<TABLE: "table">
|	<TEMPORARY: "temporary">
|	<TIMEZONE_HOUR: "timezone_hour">
|	<TIMEZONE_MINUTE: "timezone_minute">
|	<TO: "to">
|	<TRANSACTION: "transaction">
|	<TRANSLATE: "translate">
|	<TRANSLATION: "translation">
|	<TRUE: "true">
|	<TS: "ts">
|	<UNION: "union">
|	<UNIQUE: "unique">
|	<UNKNOWN: "unknown">
|	<UPDATE: "update">
|	<UPPER: "upper">
|	<USER: "user">
|	<USING: "using">
|	<VALUE: "value">
|	<VALUES: "values">
|	<VARBINARY: "varbinary">
|	<VARCHAR: "varchar">
|	<VARYING: "varying">
|	<VIEW: "view">
|	<WHENEVER: "whenever">
|	<WHERE: "where">
|	<WITH: "with">
|	<WORK: "work">
|	<WRITE: "write">
|	<YEAR: "year">
}

/*
	The next lists should contain non-SQL92 keywords, and should
	specify whether their keywords are reserved or non-reserved.
	If they are non-reserved, they need to be added to the identifier() rule.

	NOTE: XML, XMLPARSE, XMLSERIALIZE, and XMLEXISTS are considered reserved
	words to comply with the SQL/XML (2003) standard, section 5.1.
 */

/* NOTE - If you add a keyword, then you must add it to reservedKeyword()
 *	      or nonReservedKeyword() as well!
 */
TOKEN [IGNORE_CASE] :
{	/* Additional JSQL reserved keywords -- non-SQL92 reserved Keywords */
	<BOOLEAN: "boolean">
|	<CALL: "call">
|	<CURDATE: "curdate">
|	<CURTIME: "curtime">
|   <DATABASE: "database">
|	<GET_CURRENT_CONNECTION: "getCurrentConnection">
|	<EXPLAIN: "explain">
|	<LONGINT: "bigint">
|	<LONG: "long">
|	<LTRIM: "ltrim">
|	<RTRIM: "rtrim">
|	<SUBSTR:	"substr">
|	<XML:	"xml">
|	<XMLPARSE:	"xmlparse">
|	<XMLSERIALIZE:	"xmlserialize">
|	<XMLEXISTS:	"xmlexists">
}

But I don't see them in the reservedKeyword() so I guess D and T are not reserved words. Thanks
for catching it. Eric, please take those off from your changes.


> The reserved words list in the reference manual doesn't look uptodate
> ---------------------------------------------------------------------
>
>          Key: DERBY-761
>          URL: http://issues.apache.org/jira/browse/DERBY-761
>      Project: Derby
>         Type: Bug
>   Components: Documentation
>     Reporter: Mamta A. Satoor
>  Attachments: derby761.diff, rrefkeywords29722.html
>
> I looked at the 10.1 reference manual's reserved word list and noticed keywords like
BINARY, COALESCE missing from the list. Haven't checked the list thoroughly to see what else
might be missing but it would be good to fix this for 10.2

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message