Re: Best way to use indexes for partial match at - Mailing list pgsql-general

From Tom Lane
Subject Re: Best way to use indexes for partial match at
Date
Msg-id 18356.1131720025@sss.pgh.pa.us
Whole thread Raw
In response to Re: Best way to use indexes for partial match at  ("Andrus" <eetasoft@online.ee>)
List pgsql-general
"Andrus" <eetasoft@online.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

pgsql-general by date:

Previous
From: vishal saberwal
Date:
Subject: Re: replicator
Next
From: Tom Lane
Date:
Subject: Re: return next