You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Dyre Tjeldvoll (JIRA)" <ji...@apache.org> on 2014/04/09 13:08:15 UTC

[jira] [Created] (DERBY-6541) IJ's SHOW command cannot handle some legal schema and table names

Dyre Tjeldvoll created DERBY-6541:
-------------------------------------

             Summary: IJ's SHOW command cannot handle some legal schema and table names
                 Key: DERBY-6541
                 URL: https://issues.apache.org/jira/browse/DERBY-6541
             Project: Derby
          Issue Type: Bug
          Components: Tools
    Affects Versions: 10.10.1.1
            Reporter: Dyre Tjeldvoll
            Priority: Minor


The IJ command SHOW can take a schema or table name as input. E.g. SHOW TABLES/INDEXES IN <schema name>
SHOW INDEXES FROM <table name>

But the command fails if the schema or table name is a quoted identifier, which is permitted for schema and table names. E.g.:

ij> create schema "schema_identifier";
0 rows inserted/updated/deleted
ij> set schema "schema_identifier";
0 rows inserted/updated/deleted
ij> create table "table_identifier"(i int);
0 rows inserted/updated/deleted
ij> show schemas;
TABLE_SCHEM                   
------------------------------
APP                           
NULLID                        
SQLJ                          
SYS                           
SYSCAT                        
SYSCS_DIAG                    
SYSCS_UTIL                    
SYSFUN                        
SYSIBM                        
SYSPROC                       
SYSSTAT                       
schema_identifier             

12 rows selected
ij> show tables in app;
TABLE_SCHEM         |TABLE_NAME                    |REMARKS             
------------------------------------------------------------------------

0 rows selected
ij> show tables in "schema_identifier";
ERROR 42X01: Syntax error: Encountered "show" at line 1, column 1.
Issue the 'help' command for general information on IJ command syntax.
Any unrecognized commands are treated as potential SQL commands and executed directly.
Consult your DBMS server reference documentation for details of the SQL syntax supported by your server.
ij> show indexes from SYS.SYSTABLES;
TABLE_NAME          |COLUMN_NAME         |NON_U&|TYPE|ASC&|CARDINA&|PAGES   
----------------------------------------------------------------------------
SYSTABLES           |TABLENAME           |false |3   |A   |NULL    |NULL    
SYSTABLES           |SCHEMAID            |false |3   |A   |NULL    |NULL    
SYSTABLES           |TABLEID             |false |3   |A   |NULL    |NULL    
ij> show indexes from "table_identifier";
ERROR 42X01: Syntax error: Encountered "show" at line 1, column 1.
Issue the 'help' command for general information on IJ command syntax.
Any unrecognized commands are treated as potential SQL commands and executed directly.
Consult your DBMS server reference documentation for details of the SQL syntax supported by your server.



--
This message was sent by Atlassian JIRA
(v6.2#6252)