Обсуждение: Re: locale in postgresql
Tamas Nyitrai wrote: [in relation to 6.3.2, where this happens: test=> select * from test; name ---- abc bca cab (3 rows) test=> select * from test where name like 'a%'; name ---- (0 rows)] >The bug with "select" is definitely a locale-bug! If I set the LANG >variable and restart the postmaster, then the 'a%' type select fails and >the ~'^a' form of select fails as well. > >If I comment the LANG variable and restart the postmaster then it works >fine again. I would like to sort the output according to the Hungarian >alphabetic, that is why I need to set LANG to hu_HU. > >This "select/locale" thing only happens - as far as I know it - if I use >text type fields in a table, but it is OK with char(). Has anyone else seen such a locale-based problem? I would like to establish whether it is a problem in postgresql or in libc. -- Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver PGP key from public servers; key ID 32B8FAA1 ======================================== "Be of good courage, and he shall strengthen your heart, all ye that hope in the LORD." Psalms 31:24
Hi!
On Sun, 13 Dec 1998, Oliver Elphick wrote:
> Tamas Nyitrai wrote:
> [in relation to 6.3.2, where this happens:
> test=> select * from test;
> name
> ----
> abc
> bca
> cab
> (3 rows)
>
> test=> select * from test where name like 'a%';
> name
> ----
> (0 rows)]
>
>
> Has anyone else seen such a locale-based problem?
>
> I would like to establish whether it is a problem in postgresql or in
> libc.
Works fine for me with 6.4 on 2 platforms:
(Sun Solaris 2.5.1, locale=koi8-r (unix cyrillic))
(x86 Debian 2.0, locale=koi8-r)
test=> create table test (name text, value int);
CREATE
test=> insert into test values('abc', 1);
INSERT 67895 1
test=> insert into test values('bca', 2);
INSERT 67896 1
test=> insert into test values('cab', 3);
INSERT 67897 1
test=> select name from test;
name
----
abc
bca
cab
(3 rows)
test=> select name from test where name like 'a%';
name
----
abc
(1 row)
test=> select * from test where name like 'a%';
name|value
----+-----
abc | 1
(1 row)
Oleg.
----
Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/
Programmers don't die, they just GOSUB without RETURN.
On Mon, 14 Dec 1998, Oleg Broytmann wrote: > > test=> select * from test where name like 'a%'; > > name > > ---- > > (0 rows)] > > > > > > Has anyone else seen such a locale-based problem? > > Works fine for me with 6.4 on 2 platforms: > (Sun Solaris 2.5.1, locale=koi8-r (unix cyrillic)) > (x86 Debian 2.0, locale=koi8-r) Hi Oleg, If I set the LANG variable to koi8-r or to any other values, then the above select fails. :( The system I use is a x86 Debian 2.1, it seems that this error has something to do with libc6-2.0.7u, rather then postgresql. Regards, Tamas
Hi!
On Mon, 14 Dec 1998, Tamas Nyitrai wrote:
> If I set the LANG variable to koi8-r or to any other values, then the
> above select fails. :(
>
> The system I use is a x86 Debian 2.1, it seems that this error has
> something to do with libc6-2.0.7u, rather then postgresql.
Debian 2.0 lacks koi8 locale - I have installed it manually. May be you
just have no proper localedata?
Oleg.
----
Oleg Broytmann National Research Surgery Centre http://sun.med.ru/~phd/
Programmers don't die, they just GOSUB without RETURN.