X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AA644D1B18A; Wed, 9 Jun 2004 11:43:51 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43304-06; Wed, 9 Jun 2004 14:43:54 +0000 (GMT) Received: from anor.ics.muni.cz (anor.ics.muni.cz [147.251.4.35]) by svr1.postgresql.org (Postfix) with ESMTP id 2B079D1B199; Wed, 9 Jun 2004 11:43:49 -0300 (ADT) Received: from anxur.fi.muni.cz (anxur.fi.muni.cz [147.251.48.3]) by anor.ics.muni.cz (8.12.1/8.12.1) with ESMTP id i59EhmnC007188; Wed, 9 Jun 2004 16:43:48 +0200 Received: from anxur.fi.muni.cz (localhost [127.0.0.1]) by anxur.fi.muni.cz (8.12.10/8.12.8) with ESMTP id i59Ehhel020460; Wed, 9 Jun 2004 16:43:43 +0200 (MEST) Received: (from adelton@localhost) by anxur.fi.muni.cz (8.12.10/8.12.8/Submit) id i59Ehcqw020459; Wed, 9 Jun 2004 16:43:38 +0200 (MEST) X-Authentication-Warning: anxur.fi.muni.cz: adelton set sender to adelton@fi.muni.cz using -f Date: Wed, 9 Jun 2004 16:43:38 +0200 From: Honza Pazdziora To: Grega Bremec Cc: pgsql-admin@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [HACKERS] Refined LC_COLLATE or multiple database clusters? Message-ID: <20040609144338.GD29863@anxur.fi.muni.cz> References: <20040609103303.GA4016@elbereth.noviforum.si> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040609103303.GA4016@elbereth.noviforum.si> User-Agent: Mutt/1.5.4i X-Muni-Spam-TestIP: 147.251.48.3 X-Muni-Virus-Test: Clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/112 X-Sequence-Number: 13772 On Wed, Jun 09, 2004 at 12:33:03PM +0200, Grega Bremec wrote: > > Collate order for those databases, however, needs to be different. Obviously, [...] > Is it possible to do either of these things that could solve this problem > adequately: > > - somehow manage to make one postmaster run on top of two separate > database clusters that would each have a different collate ordering > scheme > > - use some other method of initializing one database from a different > template and taking with it LC_COLLATE setting (I suppose not, as > the "${PGDATA}/global/" directory is global to the cluster) > > - use a patch that would add such functionality or upgrade to a version > (even if release-candidate, beta is not really an option, i gather) > of PostgreSQL that supported it > > - in absence of any other viable solution, change the global setting of > the database cluster without having to dump/reinitdb/restore it If you do not need the collating sequence to affect index operations, you can use nls_string function to sort using order by nls_string(column, 'sl_SI.utf-8') where any locale can be specified in the runtime. The nls_string result can also be used to compare strings in collating manner, however, indexes will not be used in that case, which may or may not be a problem for your usage. The source of nls_string with installation instructions can be found at http://www.fi.muni.cz/~adelton/l10n/ -- ------------------------------------------------------------------------ Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/ .project: Perl, mod_perl, DBI, Oracle, large Web systems, XML/XSL, ... Only self-confident people can be simple.