Re: order by accents?
Manuel Sugawara <masm@fciencias.unam.mx>
From: Manuel Sugawara <masm@fciencias.unam.mx>
To: ERIC Lawson - x52010 <eric@bioeng.washington.edu>
Cc: Patrick Coulombe <pcoulombe@mediacces.com>, pgsql-novice@postgresql.org
Date: 2000-07-10T19:29:03Z
Lists: pgsql-novice
ERIC Lawson - x52010 <eric@bioeng.washington.edu> writes: > > > hi, > > if I do a query like this one : > > > > SELECT name from medias ORDER BY name > > > > name > > ---- > > AAAA > > CCCC > > EEEE > > VVVV > > ZZZZ > > CCC > > ---- > > 6 rows > > > > > > Why the record : CCC is at the end? > > HOW can I fix this? By default postgres uses the standard "C" locale to sort it's results. Is your postgres installation compiled with locale support?, If it is, you can use environment variables such as LC_CTYPE to tell postgres how to sort characters. For example with LC_CTYPE=es (Spanish) your select will return: name ---- AAAA CCCC CCC EEEE VVVV ZZZZ ---- 6 rows Which may be what you was expecting. HTH. Regards, Manuel.