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 |
+------------------------------+---------------------------------------------+