From: | "Patrick Vachon" <kaleidelf(at)hotmail(dot)com> |
---|---|
To: | tgl(at)sss(dot)pgh(dot)pa(dot)us |
Cc: | pgsql-ports(at)postgresql(dot)org |
Subject: | Re: String operators <= and >= |
Date: | 2004-02-26 22:32:33 |
Message-ID: | BAY8-F8cnNRxGx6WrgT00012e7d@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-ports |
It is quite possible!
I will have to test that to confirm.
Is there any way to change the locale without having to re-initdb?
Thanks
Patrick
>From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>To: "Patrick Vachon" <kaleidelf(at)hotmail(dot)com>
>CC: pgsql-ports(at)postgresql(dot)org
>Subject: Re: [PORTS] String operators <= and >= Date: Thu, 26 Feb 2004
>14:33:19 -0500
>
>"Patrick Vachon" writes:
> > We have a strange problem when searching for a string using <= and >=
> > operators on Solaris.
> > It did work with 7.3, but not with 7.3.3, 7.3.4 and 7.4.1.
> > The database have been initialized with locale en_US.ISO8859-1
>
> > Have a simple table testtbl:
> > create table testtbl ( id int, name varchar(20));
> > Insert this record:
> > insert into testtbl values(10, 'PEREZ');
> > Now do that search:
> > select * from testtbl where name >= 'PERE' and name <= 'PERE\377';
>
>I would expect this not to find PEREZ in that locale, no matter which PG
>version you use. Try putting the three strings in a file and sorting
>them with the sort(1) command-line tool --- in en_US locale you'll
>likely find that 'PERE\377' comes between the others. For instance,
>on HPUX I get:
>
>$ cat zzz
>PEREZ
>PERE
>PERE
>$ LC_ALL=C sort zzz
>PERE
>PEREZ
>PERE
>$ LC_ALL=en_US.iso88591 sort zzz
>PERE
>PERE
>PEREZ
>$
>
>My guess is that your 7.3 installation used C locale, and you failed to
>reproduce that setting when you installed the newer versions.
>
> regards, tom lane
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-02-26 22:45:36 | Re: String operators <= and >= |
Previous Message | Tom Lane | 2004-02-26 19:33:19 | Re: String operators <= and >= |