Re: fast case-insensitive sort

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Sigi Jekabsons" <sigi(dot)j(at)workskillsprofessionals(dot)com(dot)au>
Cc: pgsql-sql(at)postgresql(dot)org, "Stephan Szabo" <sszabo(at)megazone23(dot)bigpanda(dot)com>
Subject: Re: fast case-insensitive sort
Date: 2003-04-15 05:54:58
Message-ID: 5353.1050386098@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Sigi Jekabsons" <sigi(dot)j(at)workskillsprofessionals(dot)com(dot)au> writes:
> 'surname' is varchar(255), indexed in the manner shown on my
> previous post. You're quite right, though, I just tried indexing and
> sorting by a column of type text and that worked just fine, it used the
> index in the order by. Why is that?

I would have said that the presence of the implicit varchar-to-text cast
prevented the system from detecting that the expression matches the
index value. But if it's able to detect the match in one case and not
the other, that might be a garden-variety bug. Will look at it ...

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Sigi Jekabsons 2003-04-15 06:28:26 Re: fast case-insensitive sort
Previous Message Sigi Jekabsons 2003-04-15 02:40:38 Re: fast case-insensitive sort