Received: from prod1-int.codesense.com (unknown [193.10.39.189]) by postgresql.org (Postfix) with ESMTP id CB2D94759CC for ; Mon, 25 Mar 2002 07:41:53 -0500 (EST) Received: from gmg (gmg.codesense.com [192.168.0.183]) by prod1-int.codesense.com (8.11.4/8.11.4) with ESMTP id g2PCVNG28509; Mon, 25 Mar 2002 13:31:23 +0100 From: "Niclas Gustafsson" To: "'Oliver Elphick'" Cc: Subject: Re: to --enable-locale or not to --enable-locale? Date: Mon, 25 Mar 2002 13:41:36 +0100 Organization: CodeSense AB Message-ID: <003501c1d3fa$67d3e7f0$b700a8c0@gmg> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 Importance: Normal In-Reply-To: <002301c1d3f2$d5b6adf0$b700a8c0@gmg> X-Archive-Number: 200203/304 X-Sequence-Number: 3838 Hrm, a big RTFM to myself. :) >"The sort order used within a particular database cluster is set=20 >by initdb and cannot be changed later, short of dumping all data,=20 >rerunning initdb, and reloading the data." Well I changed LC_ALL to LATIN1 and run initdb, dumped back all the=20 data, but the sorting order seem to wrong still, allthough different,=20 pg_controldata shows: LC_COLLATE: C LC_CTYPE: C Now I get the data sorted in the order below, quite close though: aa ab a=E4 a=E5 a=F6 ba bb b=E4 b=E5 b=F6 za z=F6 =E4a =E4b =E5a =E5b The =E5 and =E4 are sorted in the wrong order. Where can I see the order of the charset? Regards, Niclas Gustafsson -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Niclas Gustafsson Sent: den 25 mars 2002 12:47 To: 'Oliver Elphick' Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] to --enable-locale or not to --enable-locale? Hi, I am sure that 1) is correct, allthough I think I've overlooked 2)! pg_controldata reports: (last 2 rows)=20 LC_COLLATE: en_US LC_CTYPE: en_US Is it possible to change this after you've run initdb?=20 Regards, Niclas Gustafsson -----Original Message----- From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Oliver Elphick Sent: den 25 mars 2002 12:26 To: Niclas Gustafsson Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] to --enable-locale or not to --enable-locale? On Mon, 2002-03-25 at 11:14, Niclas Gustafsson wrote: > Hi, I'm having trouble sorting my data. >=20 > I'm using PostgresQL 7.2 compiled with: > --enable-multibyte=3DLATIN1 --enable-locale ... > Then I've inserted some test values which seem to be sorted wrongfully > when I issue an=20 > select * from sorttest order by data ... > I want it sorted in abcd..z=E5=E4=F6 > What am I missing here? Any Ideas? 1. Does the locale you are using sort as you want? 2. Did you initdb with that locale set? (Use pg_controldata from contrib to see what locale the backend is using.) locale must be set correctly for initdb, to ensure that indexes don't get broken by changes of locale. --=20 Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C "Why are you downcast, O my soul? Why so disturbed=20=20 within me? Put your hope in God, for I will yet praise Him, my Saviour and my God." Psalm 42:11=20=20 ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html