X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 13F0B9FA2EB for ; Thu, 25 May 2006 08:00:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 51568-06 for ; Thu, 25 May 2006 08:00:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ns1.peker.com.pl (181-ego-2.acn.waw.pl [62.121.85.181]) by postgresql.org (Postfix) with SMTP id 2E2FF9F9B01 for ; Thu, 25 May 2006 08:00:01 -0300 (ADT) Received: (qmail 10211 invoked by uid 540); 25 May 2006 11:10:01 -0000 Received: from 153.19.179.26 by ns1.peker.com.pl (envelope-from , uid 401) with qmail-scanner-1.25st (clamdscan: 0.82/760. spamassassin: 3.0.2. perlscan: 1.25st. Clear:RC:1(153.19.179.26):. Processed in 0.454702 secs); 25 May 2006 11:10:01 -0000 Received: from rzgw.artnet.pl (HELO ?10.4.128.107?) (informatyka-adamr@153.19.179.26) by ns1.peker.com.pl with SMTP; 25 May 2006 11:10:01 -0000 Message-ID: <44758E02.6020703@informatyka.gdansk.pl> Date: Thu, 25 May 2006 12:59:14 +0200 From: Adam Radlowski User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: pl, en-us, en MIME-Version: 1.0 To: Robin Iddon CC: pgsql-admin@postgresql.org Subject: Re: defining Your own sort order for already compiled PostgreSQL References: <4472B8ED.7020508@informatyka.gdansk.pl> <4472C12F.8030700@edesix.com> In-Reply-To: <4472C12F.8030700@edesix.com> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/350 X-Sequence-Number: 21882 Hello, Robin. Thank You for Your answer. What's going on: Fox example, in old Paradox database system, It was possible to define Your own sort order. There was for example many ready-for-use sort definitions, like ASCII sort, DOS852, DOS850. Every sort definition was in one file. When You renamed this file as "PARADOX.SOR", Paradox used it as default sort order (after restart of Paradox). It was possible to make Your own sort definition file. Very simmilar is situation, when we at the first time run "initdb", but I don't know, how to make my own sort definition to use by "initdb". There is many read-to-use (like in Paradox) and I (after reading of docs) know, how to use them, but I want to define my own - not for example de_DE or en_US or pl_PL, but adam_ADAM ;-) and use it for "initdb". Becouse Hakan's answers didn't help me, so I decided to workaround this problem, and - I suppose - with success (the idea looks good, but it is not realised to the end yet). I don't write more about my "workaround idea", becouse it is a lot to write and I don't know, if it will be interesting for You (it was my problem, not Yours ;-) ). Greetings from Gdynia Adam Robin Iddon wrote: > Adam Radlowski wrote: > >> I can't find in the documentation, if it is possible to define our >> own sort order for already compiled PostgreSQL. >> I need it, because the best for my now building application were be >> to build sort with normal LATIN2 sort order (for non alphanumeric >> chars compatible with ASCII sort order). >> I saw in the "configure" file, that it is possible to define, what is >> alpha, what is number and so on, but it is inpossible to >> administrators of ready for use systems to - always recompile >> PostgreSQL for only one application. >> With greetings >> Adam > > > Adam, > > I am not sure I completely understand what you're trying to do - > however, initdb can set the locale for a cluster including setting > specific locales for collation (which is what I think you want to > do). I suppose you can invent your own locale if you need some > special sort order. > > These choices are frozen for the cluster (except that you can change > the encoding for a specific database within the cluster, but that > isn't going to do what you want, which is change the sort order). > > So, if you can re-run initdb then you can do what you want without > recompiling. > > See "man initdb" ... > > Hope this helps, > > Robin > > >