[
https://issues.apache.org/jira/browse/DERBY-6730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14126958#comment-14126958
]
Knut Anders Hatlen commented on DERBY-6730:
-------------------------------------------
The key column name still seems to have some restrictions that the other column
names don't have.
For example, the following works:
{noformat}
ij> create table t5(x int, "c l o b" clob);
0 rows inserted/updated/deleted
ij> call lucenesupport.createindex('app', 't5', '"c l o b"', null, 'x');
0 rows inserted/updated/deleted
{noformat}
whereas the following fails:
{noformat}
ij> create table t6("k e y" int, c clob);
0 rows inserted/updated/deleted
ij> call lucenesupport.createindex('app', 't6', 'c', null, '"k e y"');
ERROR XCXA0: Invalid identifier.
{noformat}
> Cannot create a Lucene index if a key column's name is case-sensitive
> ---------------------------------------------------------------------
>
> Key: DERBY-6730
> URL: https://issues.apache.org/jira/browse/DERBY-6730
> Project: Derby
> Issue Type: Bug
> Components: SQL, Tools
> Affects Versions: 10.11.1.1, 10.12.0.0
> Reporter: Rick Hillegas
> Assignee: Rick Hillegas
> Attachments: derby-6730-01-aa-correctCasing.diff
>
>
> The workaround is to create a view which gives the columns case-insensitive
> names. The following script shows this problem:
> {noformat}
> connect 'jdbc:derby:memory:db;create=true';
> call syscs_util.syscs_register_tool( 'luceneSupport', true );
> create schema "s";
> create table "s"."t"
> (
> "passageID" int,
> "text" varchar( 32672 )
> );
> -- fails because the trailing key id is case-sensitive
> call luceneSupport.createIndex
> (
> '"s"',
> '"t"',
> '"text"',
> null,
> '"passageID"'
> );
> create view "s"."t_view" ( passageID, text ) as select * from "s"."t";
> -- succeeds on a view with case-insensitive identifiers
> call luceneSupport.createIndex
> (
> '"s"',
> '"t_view"',
> 'text',
> null,
> 'passageID'
> );
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)