Re: weird lower() problem with character

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Björn Metzdorf <bm(at)turtle-entertainment(dot)de>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: weird lower() problem with character
Date: 2003-01-24 21:31:15
Message-ID: 22873.1043443875@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?iso-8859-1?Q?Bj=F6rn_Metzdorf?= <bm(at)turtle-entertainment(dot)de> writes:
> With 7.2.3 this worked fine, with 7.3.1 it does not work.

Your memory is playing tricks on you. That behavior is the same as it
ever was (or at least, the same as it was back to 7.0, the oldest
version I have handy to try your example on).

regression=# create table test ( test character(200) );
CREATE
regression=# insert into test values ('test(at)test(dot)com');
INSERT 797819 1
regression=# select * from test where test = lower('TEST(at)TEST(dot)COM');
test
------
(0 rows)

regression=# select version();
version
---------------------------------------------------------------
PostgreSQL 7.2.3 on hppa-hp-hpux10.20, compiled by GCC 2.95.3
(1 row)

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

Convert. char(n) is evil. If I had my druthers, we'd take it out
of the language.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lincoln Yeoh 2003-01-24 21:37:35 Re: More PHP DB abstraction layer stuff
Previous Message Tom Lane 2003-01-24 21:26:10 Re: drop table problem