dbTalk Databases Forums  

[BUGS] BUG #1069: functions "lower()" and "upper()" not characterset-aware

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1069: functions "lower()" and "upper()" not characterset-aware in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1069: functions "lower()" and "upper()" not characterset-aware - 01-28-2004 , 04:31 AM







The following bug has been logged online:

Bug reference: 1069
Logged by: Interzone

Email address: info (AT) interzone (DOT) gr

PostgreSQL version: 7.4

Operating system: Linux 2.4.24

Description: functions "lower()" and "upper()" not characterset-aware

Details:

the functions "lower()" and "upper()" do not seem to work correctly with
ISO_8859_7 values

Test case:
CREATE DATABASE mediagrk WITH TEMPLATE = template0 ENCODING = 'ISO_8859_7';
CREATE TABLE test1 (
code serial NOT NULL,
compname character varying(100) NOT NULL
);
INSERT INTO test1 VALUES (1, 'ΕΛΛΗΝΙΚΑ');
SELECT lower(compname) from test1;

if there is a problem (there might be) with the greek characters above, just
remember that this is a iso-8859-7 encoded text (and I changed the encoding
of the form-page to iso-8859-7 before sending).



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

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1069: functions "lower()" and "upper()" not characterset-aware - 01-28-2004 , 09:22 AM






"PostgreSQL Bugs List" <pgsql-bugs (AT) postgresql (DOT) org> writes:
Quote:
the functions "lower()" and "upper()" do not seem to work correctly with
ISO_8859_7 values

CREATE DATABASE mediagrk WITH TEMPLATE = template0 ENCODING = 'ISO_8859_7';
upper/lower are driven by the database locale, not the encoding.

They are presently broken for multi-byte encodings, but I don't think
ISO_8859_7 is multi-byte.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #3  
Old   
InterZone
 
Posts: n/a

Default Re: [BUGS] BUG #1069: functions "lower()" and "upper()" not characterset-aware - 01-30-2004 , 02:02 PM




Tom Lane wrote:
Quote:
"PostgreSQL Bugs List" <pgsql-bugs (AT) postgresql (DOT) org> writes:

the functions "lower()" and "upper()" do not seem to work correctly with
ISO_8859_7 values


CREATE DATABASE mediagrk WITH TEMPLATE = template0 ENCODING = 'ISO_8859_7';

upper/lower are driven by the database locale, not the encoding.

They are presently broken for multi-byte encodings, but I don't think
ISO_8859_7 is multi-byte.
Well, ISO_8859_7 is not multi-byte, and you're right:
I had:
LC_COLLATE: C
LC_CTYPE: C

I tried
initdb -E ISO_8859_7 --locale=el_GR data1
and it all worked wonderfully.

Quote:
regards, tom lane
Thanks a lot and sorry for the false alarm.
Regards
Interzone


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.