Re: Regex select ~ with ^ not using index on char field or text; Locale bug? - Mailing list pgsql-general

From Tom Lane
Subject Re: Regex select ~ with ^ not using index on char field or text; Locale bug?
Date
Msg-id 14974.988642264@sss.pgh.pa.us
Whole thread Raw
In response to Regex select ~ with ^ not using index on char field or text; Locale bug?  (Greg Maxwell <gmaxwell@martin.fl.us>)
List pgsql-general
Greg Maxwell  <gmaxwell@martin.fl.us> writes:
> On performing queries such as select * from table where name ~ '^NAME.*';
> the database fails to use the available Btree index where available, even
> when the database is told not to use the SEQ_SCAN optimization.

> PGsql was initlized and is started with the scripts in the RPM, so
> LC_ALL=C is set.  PSQL is also run with LC_ALL=C.

Are you *certain* the DB was initialized in locale C?  Try running
contrib/pg_controldata to be sure.

            regards, tom lane

pgsql-general by date:

Previous
From: Greg Maxwell
Date:
Subject: Re: Regex select ~ with ^ not using index on char field or text; Locale bug?
Next
From: Tom Lane
Date:
Subject: Re: Rebuilding database from table files