Received: from atlas.acter.ch (unknown [212.126.160.108]) by postgresql.org (Postfix) with ESMTP id 5D467476171 for ; Fri, 12 Jul 2002 04:04:48 -0400 (EDT) Received: by atlas.acter.ch (Postfix, from userid 1047) id 4CA4E85D0; Fri, 12 Jul 2002 10:04:44 +0200 (CEST) Subject: Re: Disabling case sensitivity From: Adrian 'Dagurashibanipal' von Bidder To: pgsql-general@postgresql.org In-Reply-To: <20020711092047.U63911-100000@megazone23.bigpanda.com> References: <20020711092047.U63911-100000@megazone23.bigpanda.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-BzWceujcTRuHPLRIaGdD" X-Mailer: Ximian Evolution 1.0.7 Date: 12 Jul 2002 10:04:43 +0200 Message-Id: <1026461084.6775.74.camel@atlas> Mime-Version: 1.0 X-Archive-Number: 200207/732 X-Sequence-Number: 27219 --=-BzWceujcTRuHPLRIaGdD Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 2002-07-11 at 18:22, Stephan Szabo wrote: > On Thu, 11 Jul 2002, ktt wrote: >=20 > > > > That's a problem, because I building > > a UNICODE text database and planning case insensitive > > search. >=20 > You can do case insensitive searches as long as you're > willing to use something other than var=3Dliteral (such > as tolower(var)=3Dlowerliteral or tolower(var)=3Dtolower(literal) > or var ILIKE literal). As was pointed out this will not work in the general case for non-ascii. I think it is necessary to code an explicit case insensitive and locale aware string compare function. (the libc strcoll function seems to do exactly that, except that it seems to be case sensitive, whereas strncasecomp does not respect the locale, while it knows about charsets and case). cheers -- vbi --=20 secure email with gpg http://fortytwo.ch/gpg --=-BzWceujcTRuHPLRIaGdD Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQA9Lo2bwj49sl5Lcx8RAmxaAKCHI+f3oRaMNez6TOgg30y1JGj5PACgk7Ch /qBXYyx8xeF/0OK4Kmw3pb4= =uenB -----END PGP SIGNATURE----- --=-BzWceujcTRuHPLRIaGdD--