X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D65873A472F for ; Mon, 15 Nov 2004 17:25:12 +0000 (GMT) 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 80762-07 for ; Mon, 15 Nov 2004 17:25:00 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 3E3703A46FB for ; Mon, 15 Nov 2004 17:24:59 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.12.9/8.12.9) with ESMTP id iAFHOwg5083346 for ; Mon, 15 Nov 2004 17:24:58 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.12.9/8.12.9/Submit) id iAFHCatC079660 for pgsql-sql@postgresql.org; Mon, 15 Nov 2004 17:12:36 GMT From: carex@skynet.be (carex) X-Newsgroups: comp.databases.postgresql.sql Subject: Re: select using regexp does not use indexscan Date: 15 Nov 2004 09:12:30 -0800 Organization: http://groups.google.com Lines: 28 Message-ID: <3a0a211c.0411150912.414d1ecb@posting.google.com> References: <3a0a211c.0411091202.223f1c02@posting.google.com> <20041113133651.A44723@megazone.bigpanda.com> <3972.1100390524@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: groups-abuse@google.com To: pgsql-sql@postgresql.org 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: 200411/154 X-Sequence-Number: 19473 tgl@sss.pgh.pa.us (Tom Lane) wrote in message news:<3972.1100390524@sss.pgh.pa.us>... > Stephan Szabo writes: > > On Tue, 9 Nov 2004, carex wrote: > >> And it works also perfectly with Gentoo. > >> So,is this a typical "Redhat Enterprise" problem ? > >> Or do I overlook something ?? > > > IIRC, in 7.3.x, index scans are only considered in "C" locale for > > regexp/LIKE. In 7.4.x, non-"C" locale databases can use a special > > index of a different opclass (_pattern_ops I believe). > > Not sure if this answer was explicit enough, so: evidently the database > was initdb'd in "C" locale on Gentoo, but in some other locale on Red Hat. > The only "typical Red Hat problem" is that they are more enthusiastic > about setting up non-C default locales than some other distros. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- Thank you so much. It is indeed clearer now. So I did an initdb --locale=C -D /path/to/data rebuild my database and started my "select" again. I could see my index was used even when host~'^tna2'; Thanks again.