X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D7CCE9DD685 for ; Wed, 7 Dec 2005 21:38:02 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 50768-07 for ; Wed, 7 Dec 2005 21:38:02 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sapo.pt (relay4.ptmail.sapo.pt [212.55.154.24]) by postgresql.org (Postfix) with SMTP id DF3EC9DCCA8 for ; Wed, 7 Dec 2005 21:37:56 -0400 (AST) Received: (qmail 27048 invoked by uid 0); 8 Dec 2005 01:37:59 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.157) by relay4 with SMTP; 8 Dec 2005 01:37:59 -0000 Received: (qmail 18616 invoked from network); 8 Dec 2005 01:37:55 -0000 X-AntiVirus: PTMail-AV 0.3.87.1 X-Virus-Status: Clean (0.00457 seconds) Received: from unknown (HELO hmv02) (hmv@[82.155.149.26]) (envelope-sender ) by mta7 (qmail-ldap-1.03) with SMTP for ; 8 Dec 2005 01:37:55 -0000 Message-ID: <001801c5fb98$025ac0f0$580bfea9@hmv02> From: =?iso-8859-1?Q?H=E9lder_M._Vieira?= To: Subject: Locale and pattern matching Date: Thu, 8 Dec 2005 01:37:53 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200512/64 X-Sequence-Number: 23606 A question about encoding, some days ago, led me to concentrate my attention on the subject and perform a few tests on two different 8.1 installations, configured as follows: Machine 1 - pt_PT(Portuguese_Portugal.28591)/LATIN1 Machine 2 - pt_PT(Portuguese_Portugal.28605)/LATIN9 In both machines, case insensitive pattern matching designed to match the letter 'A' will indeed match 'A' and 'a' but not the accented forms. Generalizing, an accented or unaccented vowel in the pattern will only match that vowel in upper or lowercase forms if the accent is the same as specified in the pattern. For instance, if the pattern specifies an uppercase 'A' with an accute accent, then it will match a lowercase 'A' with an accute accent, but not an upper or lower case 'A' with a tilde. This behaviour seems inconsistent with that of the ORDER BY clause, which considers all forms of a vowel as equal (uppercase/lowercase,accented/not accented). Shouldn't case insensitive pattern matching follow the same collation weights that ORDER BY uses ? Can someone please elaborate on this subject ? Another question, for european users: Until now, I've been selecting LATIN1 encoding, but after a few tests, I came to think that LATIN9 is a better option (the euro sign...). For those who regularly use LATIN9, what is your opinion ? Is it indeed a better option ? Thank you. Hélder M. Vieira LATIN CAPITAL LETTER A WITH GRAVE