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

From Andrus
Subject Re: Best way to use indexes for partial match at beginning
Date
Msg-id dktsfh$ech$1@news.hub.org
Whole thread Raw
In response to Best way to use indexes for partial match at beginning  ("Andrus Moor" <eetasoft@online.ee>)
Responses Re: Best way to use indexes for partial match at beginning
List pgsql-general
> SELECT * FROM foo WHERE bar::CHAR(1) = 'A';
> SELECT * FROM foo WHERE bar::CHAR(1) = 'B';
> SELECT * FROM foo WHERE bar::CHAR(2) = 'BC';
> SELECT * FROM foo WHERE bar::CHAR(3) = 'ABC';

 Dean,

thank you. That would be EXCELLENT solution!

Can you confirm that in this case Postgres 8.1 can use index created by

CREATE TABLE foo ( bar CHAR(10) PRIMARY KEY );

even on non-C locale ?

Andrus.



pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: Best way to use indexes for partial match at
Next
From: Tom Lane
Date:
Subject: Re: set-valued function difference in 8.1.0 vs 8.0.2