> 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.