Search Postgresql Archives

Re: RPM init-script: Why the locale setting?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux