Re: Weird behaviour on a join with multiple keys

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Charlie Clark <charlie(at)begeistert(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Weird behaviour on a join with multiple keys
Date: 2007-03-09 15:15:41
Message-ID: 29160.1173453341@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Charlie Clark <charlie(at)begeistert(dot)org> writes:
> psytec=# show lc_collate;
> lc_collate
> -------------
> de_DE.UTF-8
> (1 row)

> psytec=# show server_encoding;
> server_encoding
> -----------------
> LATIN1
> (1 row)

There's your problem right there. The string comparison routines are
built on strcoll(), which is going to expect UTF8-encoded data because
of the LC_COLLATE setting. If there are any high-bit-set LATIN1
characters in the database, they will most likely look like invalid
encoding to strcoll(), and on most platforms that causes it to behave
very oddly. You need to keep lc_collate (and lc_ctype) in sync with
server_encoding.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arnaud Lesauvage 2007-03-09 15:19:53 Bitmap AND multicolumn index used !
Previous Message Rick Schumeyer 2007-03-09 15:06:52 one-to-one schema design question and ORM