"Will Fitzgerald" <fitzgerald(at)inetmi(dot)com> writes:
> vdsq=> explain select * from login where login.login = lower('foo');
> Seq Scan on login (cost=0.00..1361.86 rows=609 width=62)
7.0 is a little bit stupid about cross-data-type comparisons (lower()
yields text, not char(n)). This example works OK in current sources,
but until 7.1 comes out you'll need to write something like
where login.login = lower('foo')::char;
Or change the login field to type text...
regards, tom lane