X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 641089FA3B0 for ; Mon, 11 Sep 2006 16:41:28 -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 20961-07 for ; Mon, 11 Sep 2006 16:41:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 4C43E9FA304 for ; Mon, 11 Sep 2006 16:41:19 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k8BJfGaK005786; Mon, 11 Sep 2006 15:41:16 -0400 (EDT) To: "=?ISO-8859-1?Q?Ragnar_=D6sterlund?=" cc: pgsql-sql@postgresql.org Subject: Re: case insensitive regex clause with some latin1 characters fails In-reply-to: <6b4c32560609111209v7edc95dcq9a559d0f5e69027b@mail.gmail.com> References: <6b4c32560609111209v7edc95dcq9a559d0f5e69027b@mail.gmail.com> Comments: In-reply-to "=?ISO-8859-1?Q?Ragnar_=D6sterlund?=" message dated "Mon, 11 Sep 2006 21:09:14 +0200" Date: Mon, 11 Sep 2006 15:41:16 -0400 Message-ID: <5785.1158003676@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.11 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/71 X-Sequence-Number: 26282 "=?ISO-8859-1?Q?Ragnar_=D6sterlund?=" writes: > I'm not sure if this is a bug or if I'm doing something wrong. I have > a database encoded with ISO-8859-1, aka LATIN1. When I do something > like: > SELECT 'Ä' ~* 'ä'; > it returns false. Check the database's locale setting (LC_CTYPE). It has to be one that expects LATIN1 encoding. The current regex code is generally not able to deal with locale-specific behaviors in UTF8 encoding, but it should work for single-byte encodings as long as you've got the locale setting right. regards, tom lane