Обсуждение: LATIN2 ORDER BY

Поиск
Список
Период
Сортировка

LATIN2 ORDER BY

От
"Kristóf Kontor"
Дата:
Hi !

My problem is that i have LATIN2 encoding in my postgres and
ISO-8859-2 charset on my linux, but when i'am ordering strings
in psql with acutes it does not work properly...
(psql version = 7.1, linux = debian woody)

Example:
SELECT name FROM table ORDER BY name;
Aaaaaa
Bbbbbb
Áááááá
...

I have set evrything on my linux, the 'locale' settings are
good, the keyboard and console settings are working well,
with acutes characters, but in the psql it doesent work...
Can you help me or sending a link or a reference in the
documentation, cause i cant find anything about this just a few
row about the locale setting ?
This is a Linux problem or just a setting in the postgres ?
What should i reconfig do correct this problem ?

Thanks !


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx

Re: LATIN2 ORDER BY

От
Victor Wagner
Дата:
On 2002.08.28 at 13:20:29 +0200, Kristóf Kontor wrote:

> Hi !
>
> My problem is that i have LATIN2 encoding in my postgres and
> ISO-8859-2 charset on my linux, but when i'am ordering strings
> in psql with acutes it does not work properly...
> (psql version = 7.1, linux = debian woody)

Are you sure, that you've system locale (LANG variable) set to
something.ISO8859-2 when you've invoked initdb command?

Are you sure that postmaster process does run with this locale?

Typically debian postinst script takes care of it, but it can fail if
locales package wasn't configured yet when postgresql package is
installed.

These two items are required by postgres to operate correctly with
charsets other than SQLANSI. I've had no problems when I began to take
them into account with any of various cyrillic charsets, since 7.1.0
Actually, only LC_CTYPE and LC_COLLATE categories are needed.

BTW, version of postgresql in Debian woody is 7.2.1
So it is strange, that you have earilier one. Have you installed it from
Debian package or build by hand? If later, it is better to revert to
Debian version.


--
Victor Wagner            vitus@ice.ru
Chief Technical Officer        Office:7-(095)-748-53-88
Communiware.Net         Home: 7-(095)-135-46-61
http://www.communiware.net      http://www.ice.ru/~vitus

Re: LATIN2 ORDER BY

От
Pavel Stehule
Дата:
If you seted locales after initdb, then you can have this problem. Try
dump data, remove files in db directory (/usr/local/pgsql/data), check
locales again :->, and initdb -D /usr/local/pgsql/data.

Pavel

On Wed, 28 Aug 2002, Kristóf Kontor wrote:

> Hi !
>
> My problem is that i have LATIN2 encoding in my postgres and
> ISO-8859-2 charset on my linux, but when i'am ordering strings
> in psql with acutes it does not work properly...
> (psql version = 7.1, linux = debian woody)
>
> Example:
> SELECT name FROM table ORDER BY name;
> Aaaaaa
> Bbbbbb
> Áááááá
> ...
>
> I have set evrything on my linux, the 'locale' settings are
> good, the keyboard and console settings are working well,
> with acutes characters, but in the psql it doesent work...
> Can you help me or sending a link or a reference in the
> documentation, cause i cant find anything about this just a few
> row about the locale setting ?
> This is a Linux problem or just a setting in the postgres ?
> What should i reconfig do correct this problem ?
>
> Thanks !
>
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>