Re: how to make collation work

Поиск
Список
Период
Сортировка
От Volkan YAZICI
Тема Re: how to make collation work
Дата
Msg-id 7104a7370505011328286fb3d8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: how to make collation work  (tövis <tovises@freemail.hu>)
Ответы Re: how to make collation work
Список pgsql-novice
Hi,

On 5/1/05, tövis <tovises@freemail.hu> wrote:
>   This was help me, on Debian Sarge.
>   PostgreSQL problems with collation sequence!
>   #dpkg-reconfigure locales        - generate - "hu_HU" and NLS hu_UTF8
>   #reboot

I know it'll be a little bit offtopic (when considered to list
caption), but you don't have to (also you shouldn't) reboot your
machine after a locale generation. Just login again to take changes
effect. (You know, one of the best side of Linux as a server OS is
that you don't have to reboot system after every configuration. Please
give up your Micros~1 habbits. :)

>   #/etc/init.d/postgresql stop
>   #su postgres -> postgres@srv02:
>
>   empty directory /var/lib/postgres/data
>
>   /usr/lib/postgresql/bin/initdb -U
> postgres --locale=hu_HU --lc-collate=hu_HU -E LATIN2 \
>  -D /var/lib/postgres/data -W --pwprompt
>   ... set same password for "postgres" root

-W and --pwprompt is just the same. Just chose one of 'em.

On 5/1/05, "Havasvölgyi Ottó" <h.otto@freemail.hu> wrote:
So far I have tried the first
> and the second with initdb, set the --locale, --lc-collate and --lc-ctype
> to that locale. But after filling a table with Hunagrian characters, and
> selecting it all with order by didn't give the result I expected. The
> encoding of the database and the client was both LATIN2. Neither worked
> the upper() and lower() functions correct with Hungarian characters.

As Tövis used above, you can pass collating locale to the database. If
there're still problems in sorting, I advice you for checking your
compiler version. (Probably gcc.) For instance, there were same
problem for Turkish locale too and we found that it's related with the
compiler, not with PostgreSQL.

And another question. How did you typed your entries to the database?
Using psql or any other client. Would you also try to import from a
file which has Hungarian characters?

Regards.

В списке pgsql-novice по дате отправления:

Предыдущее
От: tövis
Дата:
Сообщение: Re: how to make collation work
Следующее
От: Ennio-Sr
Дата:
Сообщение: Re: psql: Is it possible to run a query from a *sql file?