| От | Tom Lane |
|---|---|
| Тема | Re: Sorting with relevant blank spaces |
| Дата | |
| Msg-id | 27544.975514342@sss.pgh.pa.us обсуждение |
| Ответ на | Sorting with relevant blank spaces (Stefano Bargioni <bargioni@usc.urbe.it>) |
| Список | pgsql-general |
Stefano Bargioni <bargioni@usc.urbe.it> writes:
> I need to understand why my Postgres 6.5.2 installation sorts results ignoring blanks.
This would be a matter of the LOCALE you are running the code in.
You may want to run the postmaster with environment variable LANG=C
(or possibly LC_ALL=C, depending on your platform).
Caution: this is not something you can change on a whim, because
changing the sort order means any indexes you have on text columns
are now logically out-of-order and thus corrupt. The safest way to
proceed is pg_dumpall, stop postmaster, change LANG, initdb, restart
postmaster, load data. Don't forget to change your system boot script
to ensure the same LANG is provided when you reboot...
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера