[ 
https://issues.apache.org/jira/browse/DERBY-3256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13509851#comment-13509851
 ] 

Rick Hillegas commented on DERBY-3256:
--------------------------------------

Hi Dag,

This patch looks good to me. It seems to do the right thing. The following 
query returns a reasonable error message...

select * from table(syscs_diag.derby_keywords('foo')) t order by keyword;
ERROR 38000: The exception 'java.lang.reflect.InvocationTargetException' was 
thrown while evaluating an expression.
ERROR XJ001: Java exception: ': java.lang.reflect.InvocationTargetException'.
ERROR XJ081: Invalid value 'FOO' passed as parameter 'TYPE' to method 
'SYSCS_DIAG.DERBY_KEYWORDS'

...and a quick spot check of the reserved and unreserved lists indicates that 
the vti is correctly reporting which keywords are reserved and which aren't.

I think this is a reasonable addition to Derby's collection of diagnostic vtis. 
I say +1 to this solution. Since the full regression tests passed cleanly, I 
say go ahead and commit this patch and open an issue to document this new vti.

Thanks,
-Rick

                
> 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
>              Labels: derby_triage10_10
>         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