Re: varchar sort ordering ignore blanks - Mailing list pgsql-general

From Csaba Nagy
Subject Re: varchar sort ordering ignore blanks
Date
Msg-id 1200491029.31152.15.camel@PCD12478
Whole thread Raw
In response to varchar sort ordering ignore blanks  (Luca Arzeni <l.arzeni@amadego.com>)
List pgsql-general
On Tue, 2008-01-15 at 16:32 +0100, Luca Arzeni wrote:
> In all cases I'm using locale LATIN9 during DB creation, but I tested also
> with ASCII, UTF8 and LATIN1 encoding.

I guess this has nothing to do with the encoding, but with the collation
rules used, which is governed by "lc_collate" parameter. See what you
get on both DBs for:

SHOW lc_collate ;

Quoting from the docs:

"The nature of some locale categories is that their value has to be
fixed for the lifetime of a database cluster. That is, once initdb has
run, you cannot change them anymore. LC_COLLATE and LC_CTYPE are those
categories. They affect the sort order of indexes, so they must be kept
fixed, or indexes on text columns will become corrupt. PostgreSQL
enforces this by recording the values of LC_COLLATE and LC_CTYPE that
are seen by initdb. The server automatically adopts those two values
when it is started."

See:
http://www.postgresql.org/docs/8.1/static/charset.html

HTH,
Csaba.



pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Help with pre-loaded arbitrary key sequences
Next
From: Martijn van Oosterhout
Date:
Subject: Re: COUNT() with ORDER BY