"Andrus" <eetasoft@xxxxxxxxx> 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 ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq