Re: More on character encoding in SELECTs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rolf Johansson <rojo(at)nocrew(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: More on character encoding in SELECTs
Date: 2000-12-18 15:18:44
Message-ID: 18985.977152724@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Rolf Johansson <rojo(at)nocrew(dot)org> writes:
> When I do a SELECT xx FROM xx WHERE xx >= '' in psql, it returns lines where
> xx is starting with "A". With "", it returns lines where xx starts with "O".

> I've tried to set LC_ALL to sv_SE or swedish, nothing happens.

Don't forget that the controlling value of LC_ALL is the one in the
postmaster's environment, not the psql client's.

Also, if you restart the postmaster with a new LC_ALL setting, you will
have to drop and rebuild indexes on text columns that contain non-ASCII
characters, since they'll be out of order according to the new collation
rule.

It's possible that the misbehavior you are seeing comes from indexes
becoming corrupted because they've been run under different collation
rules at different times. You need to be careful always to start the
postmaster with the same LC_ value(s). (7.1 will enforce this by saving
LC_COLLATE at initdb time, but in current releases you have to be
careful.)

> Is the rpm for Postgres 7.0.3 compiled with locale support?

It should be...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martin A. Marques 2000-12-18 15:30:06 check constraint
Previous Message Tom Lane 2000-12-18 15:13:21 Re: Character encoding problem using Tcl