Subject Re: [ib-support] Re: Case Sensitivity on Indices
Author Nando Dessena
Martijn,

> > actually you define the _field_ with a case-insensitive collation order.
> > Or you may embed a collate clause into an order by clause I believe.
> > Perhaps even into a where clause?
>
> Dunno :)

Just verified that it should be possible to write

select ... from ...
where somefield = 'somevalue' collate IT_IT_NOCASE

So the options to use explicit collations are:
- in table definitions
- in order by clauses
- in where clauses
- in domain definitions?

I think I have read in this or some other list that the possibility to
specify a default (database-wide) collation is also being considered for
FB2.

> I can't find a clear list of case insensitive collation orders, let alone if
> they work for a WHERE clause as well.

the only one I know of is, as mentioned by others, on
www.brookstonesystems.com (ibCollate).
I don't think the source code is available, which kinda makes a Linux
port more difficult.

> > I don't think it's possible to link a particular index with a particular
> > collation, nor is this desirable (and Ann has explained why).
>
> Well, if you have the _option_ - it might be desirable sometimes :)

I think it's much better to specify it in the where clause, that way you
declare what you're doing rather than crossing your fingers in hope that
the optimizer selects the index you expect (which it doesn't do too
often by the way ;-)).

If only ibCollate would be made part of the core Firebird project and
ported to the other platforms, now *that* would be nice.
Ciao
--
____
_/\/ando