Re: Regex select ~ with ^ not using index on char field or text; Locale bug?

From: Greg Maxwell <gmaxwell(at)martin(dot)fl(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Regex select ~ with ^ not using index on char field or text; Locale bug?
Date: 2001-04-30 14:52:41
Message-ID: Pine.GSO.3.96.1010430104952.25183D-100000@da1server
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 30 Apr 2001, Tom Lane wrote:

> Greg Maxwell <gmaxwell(at)martin(dot)fl(dot)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.

If it wasn't, the start scripts in the RPM are broken.

Furthermore, I have reinited twice, very carefully and manually set all
the LC enviroment vars and still had the same result.

I wasn't aware of the pg_controldata program, I saw in other posts that
there was something in contrib to check this, but I couldn't find it.

Because of this, I changed the specfile to remove locale support, and
can't do further testing.. Sorry I didn't get your mail earlier.

Later this week, I'll be taking another system to RH7.1 + PG7.1, so I'll
let you know if I encounter the problem again.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Fred Ingham 2001-04-30 14:54:15 RE: PostgreSQL and mySQL database size question
Previous Message Tom Lane 2001-04-30 14:51:04 Re: Regex select ~ with ^ not using index on char field or text; Locale bug?