"Octavio Alvarez" <alvarezp@octavio.ods.org> writes:
> Ohh! Look at this... I think query #4 does not handle the accents
> correctly, and it should behave almost like #5 does, except for the record
> with p = 'R' which should be at the top (if they were #4's results).
> I'm using PGSQL 7.3.2 under Redhat Linux 8.0. The database was initialized
> with --lc-collate=es_MX.
How about --lc-ctype? I think that accent handling would be driven by
LC_CTYPE not LC_COLLATE. In any case, this is not a Postgres bug unless
you can show that other programs using the same LC_foo settings behave
differently. We punt pretty much all locale-related processing to
subroutines in libc.
regards, tom lane