Hi,

Another alternative is to use a case insensitive varchar:

http://h2database.com/html/datatypes.html#varchar_ignorecase_type

Regards,
Thomas




On Mon, Apr 29, 2013 at 1:48 PM, Noel Grandin <[email protected]> wrote:

> we don't support function indexes, but you can emulate them with indexes
> over computed columns, see here:
> http://www.h2database.com/**html/features.html#computed_**columns<http://www.h2database.com/html/features.html#computed_columns>
>
>
> On 2013-04-29 11:06, Pyppe wrote:
>
>> Howdy.
>>
>> Using 1.3.171 and "jdbc:h2:mem:dictservice_test;**MODE=PostgreSQL", we
>> get the following error when trying to create a lower-case index:
>>
>> org.h2.jdbc.JdbcSQLException: Syntax error in SQL statement "CREATE INDEX
>> DICTIONARY_WORD_LCASE_IDX ON DICTIONARY (LOWER([*]""word"")) "; expected
>> "ASC, DESC, NULLS, ,, )"; SQL statement:
>> CREATE INDEX dictionary_word_lcase_idx ON dictionary (lower("word"))
>> [42001-171]
>>   at org.h2.message.DbException.**getJdbcSQLException(**
>> DbException.java:329)
>>   at org.h2.message.DbException.**get(DbException.java:169)
>>   at org.h2.message.DbException.**getSyntaxError(DbException.**java:194)
>>   at org.h2.command.Parser.**getSyntaxError(Parser.java:**490)
>>   at org.h2.command.Parser.read(**Parser.java:2805)
>>   at org.h2.command.Parser.**parseIndexColumnList(Parser.**java:768)
>>   at org.h2.command.Parser.**parseCreate(Parser.java:3859)
>>   at org.h2.command.Parser.**parsePrepared(Parser.java:323)
>>   at org.h2.command.Parser.parse(**Parser.java:278)
>>   at org.h2.command.Parser.parse(**Parser.java:254)
>>
>> Is this a bug, or are "function-based" indexes simply not supported?
>>
>> - Pyppe
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "H2 Database" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to 
>> h2-database+unsubscribe@**googlegroups.com<h2-database%[email protected]>
>> .
>> To post to this group, send email to [email protected].
>> Visit this group at 
>> http://groups.google.com/**group/h2-database?hl=en<http://groups.google.com/group/h2-database?hl=en>
>> .
>> For more options, visit 
>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>> .
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to 
> h2-database+unsubscribe@**googlegroups.com<h2-database%[email protected]>
> .
> To post to this group, send email to [email protected].
> Visit this group at 
> http://groups.google.com/**group/h2-database?hl=en<http://groups.google.com/group/h2-database?hl=en>
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to