Unix Technical Forum

BUG #2300: Error in upper function

This is a discussion on BUG #2300: Error in upper function within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2300 Logged by: Kashin Oleg Email address: kashin.oleg@mail.ru PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:48 AM
Kashin Oleg
 
Posts: n/a
Default BUG #2300: Error in upper function


The following bug has been logged online:

Bug reference: 2300
Logged by: Kashin Oleg
Email address: kashin.oleg@mail.ru
PostgreSQL version: 8.1
Operating system: Suse 9.1
Description: Error in upper function
Details:

My database is with UTF8 encoding. When I use function "upper" for any filed
of table I get the next error
"Invalid multibyte character for locale".
Example:
select from users where upper(user_login) like '%';
I rewrote such SQL query like next one -
select from users where lower(user_login) like '%'; and everything now is
ok.
Thanks.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 10:48 AM
Alvaro Herrera
 
Posts: n/a
Default Re: BUG #2300: Error in upper function

Kashin Oleg wrote:

> My database is with UTF8 encoding. When I use function "upper" for any filed
> of table I get the next error
> "Invalid multibyte character for locale".


Did you select a locale appropiate for UTF8 as well? It's pretty easy
to get into trouble if you select a non-matching pair of locale and
encoding. UTF8 locales are usually prefixed with ".UTF8", so for
example in my case es_CL.UTF8 works with UTF8 encoding, but es_CL
doesn't, as the latter assumes iso-8859-1 encoding.

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:04 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com