Thread: How do i setup Postgre to use Norwegian sorting rules?

How do i setup Postgre to use Norwegian sorting rules?

From
Sten Daniel Soersdal
Date:
I've tried different settings of --locale= and --lc_collate=
But i just can't seem to get norwegian letters to be sorted correctly.
I've tried googling and manual reading but have had little luck in
finding it.

Can someone help me?

PS. This is 8.2.4 on FreeBSD 6.1

--
Sten Daniel Soersdal

Re: How do i setup Postgre to use Norwegian sorting rules?

From
Nis Jørgensen
Date:
Sten Daniel Soersdal skrev:
>
> I've tried different settings of --locale= and --lc_collate=
> But i just can't seem to get norwegian letters to be sorted correctly.
> I've tried googling and manual reading but have had little luck in
> finding it.

So, what values did you try for --locale, and what was the output of initdb?

My guess is that initdb could not find the locale you asked for, and
fell back to the default for your box.

On my Debian system, I had to add

    no_NO UTF-8

to /etc/locale.gen and then run

    /usr/sbin/locale-gen

before running

    initdb --lc_collate=no_NO

Not sure how portable this is to other Linux distros, or other Unices.

Nis