Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 76553 invoked from network); 24 Mar 2010 03:28:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Mar 2010 03:28:51 -0000 Received: (qmail 55505 invoked by uid 500); 24 Mar 2010 03:28:51 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 55318 invoked by uid 500); 24 Mar 2010 03:28:51 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 55311 invoked by uid 99); 24 Mar 2010 03:28:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Mar 2010 03:28:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Mar 2010 03:28:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 49C0E234C4AE for ; Wed, 24 Mar 2010 03:28:27 +0000 (UTC) Message-ID: <432061611.452381269401307301.JavaMail.jira@brutus.apache.org> Date: Wed, 24 Mar 2010 03:28:27 +0000 (UTC) From: "Bryan Pendleton (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-2785) ij "describe" built in command cannot describe a table named "run" In-Reply-To: <20220760.1181269406152.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bryan Pendleton updated DERBY-2785: ----------------------------------- Attachment: describeKeywords.diff Hi Eranda, Here is a diff with an idea that might be worth pursuing. It changes the behavior of the DESCRIBE statement so that, in addition to the identifier or quoted string that it could take before, it now can also take a keyword, which it then upper-cases and tries to use as a table name. The patch isn't elegant, but it seems to make 'DESCRIBE RUN' work to describe a table named 'run'. If you think this idea has merit, then the next step, I think, would be to do some more testing, and turn this simple diff into a complete patch by adding a variety of test cases which show how the new code behaves. Also, I think some additional work would be needed to be able to describe a table with the same name as an ij keyword, but in a non-default schema (as in 'DESCRIBE bryan.run' to describe the table named 'run' in the schema named 'bryan'). Let me know what you think of this idea. > 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: 10.2.2.0 > 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.