Search Postgresql Archives

Re: Locale and indexes: howto?

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

 



Il Monday 05 November 2007 21:27:27 Reg Me Please ha scritto:
> HI all.
>
> While reading chapter 11 of v8.2 I've encountered this sentence:
>
> However, if your server does not use the C locale you will need to create
> the index with a special operator class to support indexing of
> pattern-matching queries.
>
> Well, I'd like to use the C locale at least for PGSQL.
> Accordingly to my system (Linux, of course) these are my locale settings:
>
> LANG=it_IT.UTF-8
> LC_CTYPE="it_IT.UTF-8"
> LC_NUMERIC="it_IT.UTF-8"
> LC_TIME="it_IT.UTF-8"
> LC_COLLATE=C
> LC_MONETARY="it_IT.UTF-8"
> LC_MESSAGES="it_IT.UTF-8"
> LC_PAPER="it_IT.UTF-8"
> LC_NAME="it_IT.UTF-8"
> LC_ADDRESS="it_IT.UTF-8"
> LC_TELEPHONE="it_IT.UTF-8"
> LC_MEASUREMENT="it_IT.UTF-8"
> LC_IDENTIFICATION="it_IT.UTF-8"
> LC_ALL=
>
> (I'm Italian, I think).
>
> So the "locale" itself seems to be a little bit more complex than I
> thought. I already use the C language collation schema, very useful in
> directory listings. Should I install PGSQL with also the LC_CTYPE=C?
> Or what?
>
> Many thanks in advance.

OK, I solved it by myself.
You need to have *both* LC_COLLATE=C *and* LC_CTYPE=C in order to comply
with the "C locale" stated into the abovementioned paragraph.
It's written in the initdb man page.

In my humble opinion, I would be clearer in the documentation about this
point, especially in the "Indexes" chapter (11th in v8.2).
With "locale" we mean a lot of things, while just two aspects make sense in
this context.

-- 
Reg me Please

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[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