Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 51321397DD1 for ; Sun, 27 May 2012 03:01:40 -0300 (ADT) Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SYWXo-00017l-5P for pgsql-sql@postgresql.org; Sun, 27 May 2012 06:01:40 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SYWXY-0007WS-Aa for pgsql-sql@postgresql.org; Sun, 27 May 2012 08:01:20 +0200 Received: from ip-118-90-75-239.xdsl.xnet.co.nz ([118.90.75.239]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 May 2012 08:01:20 +0200 Received: from jasen by ip-118-90-75-239.xdsl.xnet.co.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 27 May 2012 08:01:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Jasen Betts Subject: Re: order by different on mac vs linux Date: 27 May 2012 05:41:33 GMT Organization: Dis (not Dat) Organisation Lines: 54 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ip-118-90-75-239.xdsl.xnet.co.nz X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-18 (Linux) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201205/96 X-Sequence-Number: 36644 On 2012-05-27, Wes James wrote: >> >> Why is there a different order on the different platforms. postgres uses the text comparison operators provided by the host platform. for linux these are defined in the locales package this may be part of the glibc package. > I'd like to bring up my question again after testing on windows xp. Why > does xp and mac os x sort properly when linux does not? osx and windows hare broken sorting, > I tested this last > week with ubuntu 11.10 and it is doing the same thing as 12.04. UTF8 > encoding and lc_collate = en_US.UTF-8 on mac and linux and american_usa on > windows which is the same thing as en_US.UTF-8. All are using UTF8 > encoding. > > I'd really like to use linux to host this DB (and have it hosted in vmware > ESXi), but the order is not coming out correct. I've got foreign titles of > books in this db, so I need the UTF8 all the way through. "C" won't cut it. I briefly worked for a library software company. They had defined their own ordering operator in the form of a function that mangled strings (they were using paradox database) As I understand it postgres allows you to define your own types with their own ordering operators even ignoring the issue of non-alphabetic symbols there are problems that should be addressed for sorting titles and names. Many of these are due to abbreviations which shouls be sorted asif expanded. some examples: St. Stephen of Hungary Saint Stephen the Martyr St. Rita Street art. Wall Stickers Wall st. Wall Street McArthur MacArthur, Douglass Maccaroni Wye Road Y Road -- ⚂⚃ 100% natural