Re: BUG #2309: Wrong string comparison - Mailing list pgsql-bugs

From Yury Don
Subject Re: BUG #2309: Wrong string comparison
Date
Msg-id 200603101257.30717.yura@vpcit.ru
Whole thread Raw
In response to Re: BUG #2309: Wrong string comparison  (Volkan YAZICI <yazicivo@ttnet.net.tr>)
List pgsql-bugs
On Friday 10 March 2006 12:36, Volkan YAZICI wrote:
> Hi,
>
> On Mar 09 02:00, Yury Don wrote:
> > Looks like string comparison operators ignore spaces isnside of string.
> > Because of this sorting on text fields is wrong.
> >
> > mdb=# select 'a z'::text>'ad'::text;
> >  ?column?
> > ----------
> >  t
>
> PostgreSQL relies on your locale for collation. Therefore, first you
> need to check if your locale settings are working. For instance:
>
> $ TEXT="a z\nad"
> $ echo -e $TEXT | LC_COLLATE=tr_TR.iso88599 sort
> ad
> a z
> $ echo -e $TEXT | LC_COLLATE=C sort
> a z
> ad
>
>
> Regards.
>

My locale is KOI8-R and sorting in PostgreSQL corresponds to sorting in
locale. I just didn't expect that sorting will be this way ...

--
Best regards,
Yury Don

pgsql-bugs by date:

Previous
From: Volkan YAZICI
Date:
Subject: Re: BUG #2309: Wrong string comparison
Next
From: "j6m"
Date:
Subject: Re: Suse Installations