Re: Case insensitive selects? - Mailing list pgsql-general

From David Wheeler
Subject Re: Case insensitive selects?
Date
Msg-id Pine.LNX.4.21.0102151100080.17559-100000@theory
Whole thread Raw
In response to Re: Case insensitive selects?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Thu, 15 Feb 2001, Tom Lane wrote:

> Not then either; you'd need to write
>
> SELECT *
> FROM   mime_type
> WHERE  LOWER(name) = LOWER('text/HTML');
>
> or equivalently
>
> SELECT *
> FROM   mime_type
> WHERE  LOWER(name) = 'text/html';
>
> which is what will result from constant-folding anyway.

Yes, of course; my oversight.

> The details of invocation seem beside the point, however.  The point is
> that a btree index is all about sort order, and the sort order of data
> viewed case-sensitively is quite different from the sort order of
> monocased data.  Perhaps in an ASCII universe you could play some tricks
> to make the same index serve both purposes, but it'll never work in
> non-ASCII locales ...

Hmmm...somehow, MS gets it to work in SQL Server. Lord knows how (or if
it's effective or fast), but I won't worry about it (since the last
thing I want to do is switch to NT!). I'll just code more carefully per
the examples above to ensure proper index use.

Thanks,

David


pgsql-general by date:

Previous
From: "bcs-brockmann.de"
Date:
Subject: Error by starting postmaster
Next
From: Warren Vanichuk
Date:
Subject: Regression test questions.