Re: Controlling locale and impact on LIKE statements

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Controlling locale and impact on LIKE statements
Дата
Msg-id 20070905022342.GF23731@alvh.no-ip.org
обсуждение исходный текст
Ответ на Controlling locale and impact on LIKE statements  ("Martin Langhoff" <martin.langhoff@gmail.com>)
Ответы Re: Controlling locale and impact on LIKE statements  (Gregory Stark <stark@enterprisedb.com>)
Re: Controlling locale and impact on LIKE statements  ("Martin Langhoff" <martin.langhoff@gmail.com>)
Список pgsql-general
Martin Langhoff escribió:

> As I have a Pg install where the locale is already en_US.UTF-8, and
> the database already exists, is there a DB-scoped way of controlling
> the locale?

Not really.

> Is there a better way? In this specific install I can create the
> additional index. However, this needs a general fix for Moodle, which
> has an abstract  DB schema handling (we support MySQL, Pg, MSSQL,
> Oracle) and the whole thing of figuring out what the locale is and
> whether to add magical additional indexes just for Pg makes me look
> like a loony.

You are right and Eloy is wrong on that discussion.  There is not
anything the DB can do to use the regular index if the locale is not C
for LIKE queries.  There are good reasons for this.  There's not much
option beyond creating the pattern_ops index.

--
Alvaro Herrera       Valdivia, Chile   ICBM: S 39º 49' 18.1", W 73º 13' 56.4"
"Most hackers will be perfectly comfortable conceptualizing users as entropy
 sources, so let's move on."                               (Nathaniel Smith)

В списке pgsql-general по дате отправления:

Предыдущее
От: "Martin Langhoff"
Дата:
Сообщение: Controlling locale and impact on LIKE statements
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Documentation fix regarding atan2