Re: order by accents?
От | ERIC Lawson - x52010 |
---|---|
Тема | Re: order by accents? |
Дата | |
Msg-id | Pine.GSO.4.10.10007100930270.27288-100000@gandalf.bioeng.washington.edu обсуждение исходный текст |
Ответ на | order by accents? (Patrick Coulombe <pcoulombe@mediacces.com>) |
Список | pgsql-novice |
Hi, I found a work-around for my problem (controlling the results of an "order by") after observing that the sort-order was ascii-based. By using the function lower(fieldname) or upper(fieldname), I get something approximating what I would expect of an ordered last name list. I suggest, non-authoritatively, that your problem with the accented E character has a similar work-around by way of the translate function, i.e., for the one character, something like order by translate('fieldname','[accented E character]','E') For more than one character, (e.g., accented E and accented U), it would probably be best to write a function that translates all the characters into characters that will fall in the correct spot in your list order. Please note that I've very little idea what I'm talking about. For example, I assume the sort order is locale-based, and will thus be different for locales where the collating sequence is other than ASCII; further, I assume the sort order can be tweaked via mechanisms with which I'm totally unfamiliar. Eric James Eric Lawson Research Publications Editor III National Simulation Resource eric@bioeng.washington.edu On Fri, 7 Jul 2000, Patrick Coulombe wrote: > 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? > > Thank you > Patrick >
В списке pgsql-novice по дате отправления: