Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
10.10.1.1
-
None
-
None
Description
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.