dbTalk Databases Forums  

[BUGS] incorrect collation order in at least some non-C locales

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] incorrect collation order in at least some non-C locales in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Martin Pitt
 
Posts: n/a

Default [BUGS] incorrect collation order in at least some non-C locales - 02-05-2006 , 01:10 PM






Hi PostgreSQL developers!

I recently got the email below and confirmed that I get the same
broken collation order in de_DE.UTF-8 as the original reporter (who
probably uses pt_PT.something). It works fine in C, though.

System: Debian unstable, according to the reporter the bug does not
happen under Windows.

Any idea?

Thank you!

Martin

----- Forwarded message from fgaroso <fgaroso (AT) ig (DOT) com.br> -----

To: mpitt (AT) debian (DOT) org
From: fgaroso <fgaroso (AT) ig (DOT) com.br>
Subject: Bug PostgreSQL
Date: Wed, 1 Feb 2006 14:12:04 -0200
X-Spam-Status: No, score=2.1 required=4.0 tests=BAYES_50,DNS_FROM_RFC_POST,
RCVD_IN_NJABL_PROXY autolearn=no version=3.0.3

Content-Description: Mail message body
Version: Unstable package postgresql-8.1
Date Download: 2006-02-01 (apt-get)

Description:

create table tmp ( name char(30) );
create index tmp_idx on tmp (name);
insert into tmp values ( 'SUEKO' );
insert into tmp values ( 'SUE E' );
insert into tmp values ( 'SUE T' );

select * from tmp order by name;

Returns incorrect order:

teste=# select * from tmp order by name desc;
name
--------------------------------
SUE T
SUEKO
SUE E
(3 registros)


Note:
Version for windows tested and OK




----- End forwarded message -----

--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly

Reply With Quote
  #2  
Old   
Stephan Szabo
 
Posts: n/a

Default Re: [BUGS] incorrect collation order in at least some non-C locales - 02-05-2006 , 01:28 PM






On Sun, 5 Feb 2006, Martin Pitt wrote:

Quote:
Hi PostgreSQL developers!

I recently got the email below and confirmed that I get the same
broken collation order in de_DE.UTF-8 as the original reporter (who
probably uses pt_PT.something). It works fine in C, though.
This is probably not "broken collation order" but instead how those
locales are defined. Many natural language locales are defined to not use
spaces in first pass ordering (like the ordering in a dictionary). Thus
the first pass strings are effectively, "SUEKO", "SUEE" and "SUET".

Quote:
System: Debian unstable, according to the reporter the bug does not
happen under Windows.
The reason for that is that he has "C" locale under Windows.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] incorrect collation order in at least some non-C locales - 02-05-2006 , 01:50 PM



Stephan Szabo <sszabo (AT) megazone (DOT) bigpanda.com> writes:
Quote:
This is probably not "broken collation order" but instead how those
locales are defined.
I'd only consider it "broken" if you get different sort order from
sort(1) under the same locale. Here is an example from Fedora 4
showing that sort(1) has the same ideas about what de_DE sort order
is:

[tgl ~]$ cat zzz
SUEKO
SUE E
SUE T
[tgl ~]$ sort zzz
SUE E
SUE T
SUEKO
[tgl ~]$ LANG=de_DE.utf8 sort zzz
SUE E
SUEKO
SUE T
[tgl ~]$

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.