db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2785) ij "describe" built in command cannot describe a table named "run"
Date Wed, 24 Mar 2010 08:09:27 GMT

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

Knut Anders Hatlen commented on DERBY-2785:

Hi Bryan,

The patch seems to have been generated against a fairly old copy of trunk, and it does not
apply cleanly because of the changes in DERBY-4430. Also, in the spirit of DERBY-4430, we
may want to check the meta-data for the underlying DBMS instead of unconditionally converting
the keyword to upper case, see the caIdentifier() method introduced in that issue.

Perhaps it's even safe to add keywords to caIdentifier(). It's not used many places, so it
shouldn't be too much work to go through its usages and check if adding keywords to it would
introduce any ambiguities in the grammar. The advantage of adding it to caIdentifier() is
that it will then also work for other ij commands than DESCRIBE. For instance, "show indexes
from run" would start working.

> ij "describe" built in command cannot describe a table named "run"
> ------------------------------------------------------------------
>                 Key: DERBY-2785
>                 URL: https://issues.apache.org/jira/browse/DERBY-2785
>             Project: Derby
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions:
>         Environment: OS-X, Java 1.5
>            Reporter: Tim Halloran
>            Assignee: Eranda Sooriyabandara
>            Priority: Minor
>         Attachments: describeKeywords.diff, step logs.txt
> steps to duplicate:
> (attach ij to any database)
> ij> create table run (i int);
> 0 rows inserted/updated/deleted
> ij> desc run;
> ERROR 42X01: Syntax error: Encountered "desc" at line 1, column 1.
> ij> 
> I think this is a parser problem within ij where the "run" is taken as a token and that
token is not included in the definition of a tablename expression in the grammer (should be
an easy fix).

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message