[
https://issues.apache.org/jira/browse/DERBY-2222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463229
]
Kristian Waagan commented on DERBY-2222:
----------------------------------------
I kind of assumed 'schemaName' was an identifier. The description for
identifier says this
(http://db.apache.org/derby/docs/dev/tools/tools-single.html#rtoolsijcomref40155):
"Identifier
Syntax
Identifier
Description
Some ij commands require identifiers. These ij identifiers are
case-insensitive. They must begin with a letter in the range A-Z, and can
consist of any number of letters in the range A-Z, digits in the range 0-9, and
underscore (_) characters.
These identifiers exist within the scope of ij only and are distinct from any
identifiers used in SQL commands, except in the case of the Get Cursor command.
The Get Cursor command specifies a cursor name to use in creating a result set.
ij does not recognize or permit delimited identifiers in ij commands. They can
be used in SQL commands.
Example
These are valid ij identifiers:
foo1
exampleIdentifier12345
another_one"
Maybe I'm wrong, but it's a bit hard to understand from the documentation. Some
identifiers are linked to the page I mentioned, some are not. and others again
might not be identifiers at all! If th latter is the case, then show indexes
also has bugs in the handling of delimited/quoted table and schema names.
> 'show indexes in SCHEMANAME' does not work with the client driver
> -----------------------------------------------------------------
>
> Key: DERBY-2222
> URL: https://issues.apache.org/jira/browse/DERBY-2222
> Project: Derby
> Issue Type: Bug
> Components: Network Client, Tools
> Affects Versions: 10.2.2.0, 10.3.0.0
> Reporter: Kristian Waagan
>
> The ij command 'show indexes in SCHEMANAME' does not work at all with the
> client driver.
> It does work with the embedded driver.
> Sample output from ij:
> ij> connect 'jdbc:derby://localhost/myDB;create=true';
> ij> create table test (id int primary key);
> 0 rows inserted/updated/deleted
> ij> show indexes in app;
> ERROR XJ103: Table name can not be null
> ij> show indexes from test;
> TABLE_NAME |COLUMN_NAME |NON_U&|TYPE|ASC&|CARDINA&|PAGES
> ----------------------------------------------------------------------------
> TEST |ID |0 |3 |A |NULL |NULL
> 1 row selected
> ij> show indexes from app.test;
> TABLE_NAME |COLUMN_NAME |NON_U&|TYPE|ASC&|CARDINA&|PAGES
> ----------------------------------------------------------------------------
> TEST |ID |0 |3 |A |NULL |NULL
> 1 row selected
> ij>
> Using delimited table and/or schema names does not work, but I think this is
> according to documentation.
> I.e.:
> ij> show indexes from "TEST";
> ERROR 42X01: Syntax error: Encountered "show" at line 1, column 1.
> ij> show indexes from "APP".test;
> ERROR 42X01: Syntax error: Encountered "show" at line 1, column 1.
> ij> show indexes from "APP"."TEST";
> ERROR 42X01: Syntax error: Encountered "show" at line 1, column 1.
> ij>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira