Andrus wrote:
> > 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';
> 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 ?
It will not use the index no matter what locale. You would in these
cases need to create additional expression indexes on bar::char(1) etc.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/