weird lower() problem with character - Mailing list pgsql-general

From Björn Metzdorf
Subject weird lower() problem with character
Date
Msg-id 001a01c2c3d9$8698de00$81c206d4@office.turtleentertainment.de
Whole thread Raw
Responses Re: weird lower() problem with character
List pgsql-general
Hi,

it seems that something has changed in handling 'character' datatypes.

With 7.2.3 this worked fine, with 7.3.1 it does not work.

This is a test with varchar, and it works:
==============================================================
test=> create table test ( test varchar(200) );
CREATE TABLE
test=> insert into test values ('test@test.com');
INSERT 12016215 1
test=> select * from test where test = lower('TEST@TEST.COM');
     test
---------------
 test@test.com
(1 row)
==============================================================

with 'character' it does not work anymore:
==============================================================
test=> create table test ( test character(200) );
CREATE TABLE
test=> insert into test values ('test@test.com');
INSERT 12016228 1
test=> select * from test where test = lower('TEST@TEST.COM');
 test
------
(0 rows)
==============================================================

Comments? How can I fix that without converting to varchar?

Regards,
Bjoern


pgsql-general by date:

Previous
From: "frank_lupo"
Date:
Subject: drop table problem
Next
From: Dennis Gearon
Date:
Subject: Re: More PHP DB abstraction layer stuff