Re: select fails on indexed varchars.

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alex Krohn <alex@gossamer-threads.com>
Cc: pgsql-bugs@postgresql.org
Date: 2001-01-30T01:44:49Z
Lists: pgsql-bugs
> links=# select * from foo where a < 'Test0'::bpchar;      
>  a 
> ---
> (0 rows)

> links=# 

> Are you saying the second test should have returned true under C locale? 

Yes.  You are not really in C locale, or at least your postmaster isn't.
This looks like ISO sorting rules to me --- perhaps you are in en_US
locale.

> Is this a version dependant bug? Will downgrading to 6.x get me going?

No.  Fix your locale.  I'm afraid I don't have any more advice to offer
on that than I gave already ...

			regards, tom lane