X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 935E2528BE for ; Tue, 9 Aug 2005 13:56:05 -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 53957-06 for ; Tue, 9 Aug 2005 16:56:01 +0000 (GMT) Received: from smtp5.jaring.my (smtp5.jaring.my [61.6.32.55]) by svr1.postgresql.org (Postfix) with ESMTP id 33DC55288B for ; Tue, 9 Aug 2005 13:55:55 -0300 (ADT) Received: from nexus.localhost. ([218.208.198.128]) (authenticated bits=0) by smtp5.jaring.my (8.13.1/8.13.1) with ESMTP id j79GtlhC076304; Wed, 10 Aug 2005 00:55:48 +0800 (MYT) (envelope-from lyeoh@pop.jaring.my) Message-Id: <5.2.1.1.1.20050810002451.040956b8@localhost> X-Sender: lyeoh@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.2.1 Date: Wed, 10 Aug 2005 00:52:00 +0800 To: Martijn van Oosterhout , Salem Berhanu From: Lincoln Yeoh Subject: Re: postgres & server encodings Cc: pgsql-general@postgresql.org In-Reply-To: <20050809155946.GF8244@svana.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: JARING E-Mail Virus Scanner v2.0 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200508/460 X-Sequence-Number: 81868 At 05:59 PM 8/9/2005 +0200, Martijn van Oosterhout wrote: >SQL_ASCII means that the database does no locale specific or language >specific encoding ever. It won't check what you send it either. If >you're content to let clients deal with any encoding issues, this may >be what you want. > >But anything to do with lower(), upper(), case-insenstive in the >database itself will be totally stupid since it's assuming ASCII. Is it possible or even good to have the ability to allow you to pick a particular locale for a query/function? e.g. select * from messages where locale_code=$locale_code order by locale_code, multilocale_lower(message,locale); Or even: create index lower_keyword_idx on keywords (multilocale_lower(keyword,locale)) (there's a column called locale in both tables) Does that actually make sense? ;) I suppose we can do that in the client. But it'll be nicer if we can use "order by", "group by", and do it for more than one locale at a time. Can Postgresql currently handle more than one locale within the same database AND have some useful locale sensitive DB functions? Regards, Link.