Re: Best way to use indexes for partial match at

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus" <eetasoft(at)online(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Best way to use indexes for partial match at
Date: 2005-11-11 14:40:25
Message-ID: 18356.1131720025@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andrus" <eetasoft(at)online(dot)ee> writes:
> Planner must use index
> CREATE TABLE foo ( bar CHAR(10) PRIMARY KEY );
> for queries like
> SELECT * FROM foo WHERE bar::CHAR(3)='ABC';
> Can you make this patch or add this to todo list ?

This isn't going to happen for exactly the same reason that LIKE
optimization doesn't happen (in non-C locales): the sort order of
non-C indexes isn't compatible with testing a prefix of the string.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-11-11 14:57:16 Re: return next
Previous Message vishal saberwal 2005-11-11 14:31:19 Re: replicator