Skip site navigation (1) Skip section navigation (2)

Re: Collate problem when using ORDER BY

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: David Harel <hareldvd(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Collate problem when using ORDER BY
Date: 2008-05-30 19:30:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
David Harel napsal(a):
> Hi,
> I'm new here. I work on a site that uses postgres version 8.1.5 and 
> database encoding ISO_8859_8. When I sort select requests using order by 
> the "weight" of the characters seem to be really funny (but consistent). 
> It seems to me that if I create a "phantom" converted field such as:
> SELECT field convert(field, "ISO_8859_8" ,"UTF8") as field_utf8 ORDER BY 
> field_utf8;
> Then the sort will be OK however, I get the error:
> Query failed: ERROR: character 0xd7 of encoding "ISO_8859_8" has no 
> equivalent in "UTF8".
> Is it due to a "bad" character in the content?
> Can I get rid of it like find/replace?
> Can I change collate for a given table/database?

You can use only one encoding per database. It means you convert data from UTF8 
to ISO_8859_8, but you store it back into UTF8 encoded field. Probably strcoll 
function is confused with illegal UTF8 character which has been created by your 


In response to

pgsql-general by date

Next:From: Greg Sabino MullaneDate: 2008-05-30 19:33:26
Subject: Re: Mediawiki 1.10 and PG 8.3 upgrade
Previous:From: Zdenek KotalaDate: 2008-05-30 19:26:52
Subject: Re: Connection problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group