Re: RPM init-script: Why the locale setting? - Mailing list pgsql-general

From Paul Thomas
Subject Re: RPM init-script: Why the locale setting?
Date
Msg-id 20040404233324.A2892@bacon
Whole thread Raw
In response to RPM init-script: Why the locale setting?  (Troels Arvin <troels@arvin.dk>)
List pgsql-general
On 04/04/2004 21:48 Troels Arvin wrote:
> Hello,
>
> In the init-script contained in the RPMs downloadable from the PostgreSQL
> site (I checked the one for Fedora), an explicit locale is set before
> running initdb. - And the explicit locale is not "C".
>
> This means that a PostgreSQL installation will not use indexes for LIKE
> queries (I just ran into this). See
> http://www.postgresql.org/docs/faqs/FAQ.html#4.8

No. It says that [normal] indexes won't be used for:

     select foo from bar where col like '%abc';
or
     select foo from bar where col like '%abc%';

or ILIKE is used. And even then you can use a functional index of the form

CREATE INDEX tabindex ON tab (lower(col));

> I suggest that the init-script be rewritten so that LANG and LC_ALL are
> unset before initdb is run (which happens the first time PostgreSQL is
> started after the RPM-based installation).

I'll admit that I don't know what effect this would have but I'm
interested to find out.

regards

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for
Business             |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

pgsql-general by date:

Previous
From: Troels Arvin
Date:
Subject: RPM init-script: Why the locale setting?
Next
From: Shachar Shemesh
Date:
Subject: Version 1.0.0.4 released