[ 
https://issues.apache.org/jira/browse/DERBY-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dag H. Wanvik updated DERBY-3256:
---------------------------------

    Attachment: derbykeywords-1.stat
                derbykeywords-1.diff

Here is a proof-of-concept patch that scrapes the reserved and unreserved 
keywords that Derby uses from the sqlgrammar.jj file, generates a class 
Keywords.java and uses the generated string arrays in that class to make a 
diagnostic table function to be used as:

   select * from table(syscs_diag.derby_keywords('reserved')) t order by keyword

or 
  
   select * from table(syscs_diag.derby_keywords('unreserved')) t order by 
keyword

It also adds a test to SysDiagVTIMappingTest: testDerbyKeywords

                
> Derby's reserved keyword list does not agree with either the SQL 92 or SQL 
> 2003 standards
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3256
>                 URL: https://issues.apache.org/jira/browse/DERBY-3256
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.3.1.4
>            Reporter: Rick Hillegas
>         Attachments: derbykeywords-1.diff, derbykeywords-1.stat, keywords.tar
>
>
> According to the comments in sqlgrammar.jj, Derby's understanding of reserved 
> vs. non-reserved keywords is supposed to be based on SQL 92. However, Derby 
> has 8 reserved keywords which are not part of the SQL 92 list of reserved 
> keywords. The SQL 2003 spec moved many of the SQL 92 reserved keywords to the 
> non-reserved list. Derby has 55 reserved keywords which are not part of the 
> SQL 2003 list. 42 of Derby's reserved keywords are in the SQL 2003 list of 
> non-reserved keywords.
> The reserved keywords create migration problems when moving applications from 
> other databases to Derby. We should consider whether there is any reason that 
> Derby should have more reserved keywords than appear in the SQL 2003 standard.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to