Re: bug: LC_CTYPE=en_US.UTF-8 confuses query planner - Mailing list pgsql-hackers

From Tom Lane
Subject Re: bug: LC_CTYPE=en_US.UTF-8 confuses query planner
Date
Msg-id 15235.1119970118@sss.pgh.pa.us
Whole thread Raw
In response to bug: LC_CTYPE=en_US.UTF-8 confuses query planner  (Dmitry Karasik <dk@catpipe.net>)
List pgsql-hackers
Dmitry Karasik <dk@catpipe.net> writes:
> When database is initdb'ed with LC_CTYPE=C, the query uses index
> scan; when LC_CTYPE=en_US.UTF-8 it is the sequential scan.

This is in the FAQ:    When using wild-card operators such as LIKE or ~, indexes can only be  used in certain
circumstances:     ...    * The default C locale must be used during initdb because it is not      possible to know the
next-greatestcharacter in a non-C locale.      You can create a special text_pattern_ops index for such cases      that
workonly for LIKE indexing.
 
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: initdb -W failure with role-capable catalogs
Next
From: Pavel Stehule
Date:
Subject: Re: Implementing SQL/PSM for PG 8.2 - debugger