From: | Daniele Orlandi <daniele(at)orlandi(dot)com> |
---|---|
To: | pgsql-general(at)postgreSQL(dot)org |
Subject: | Strange behaviour ? |
Date: | 1998-07-30 15:46:53 |
Message-ID: | 35C0956D.1A05A82@orlandi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
tacacs=> CREATE TABLE bugdb
tacacs-> (
tacacs-> id int4 default nextval('bugdb_id_seq') primary key,
tacacs-> email varchar(50) NOT NULL,
tacacs-> sdescr varchar(80),
tacacs-> ldescr text,
tacacs-> version char(16),
tacacs-> status char(16),
tacacs-> comments text,
tacacs-> ctime datetime,
tacacs-> mtime datetime
tacacs-> );
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index bugdb_pkey for
table bugdb
CREATE
tacacs=> insert into bugdb values ( 1,'daniele(at)orlandi(dot)com','Test
BUG','TestText','3.0.0','open' );
INSERT 2725845 1
tacacs=> SELECT id,status,version,email,sdescr FROM bugdb WHERE status = 'open'
ORDER BY id;
id|status | version|email |sdescr
--+----------------+----------------+-------------------+--------
1|open |3.0.0 |daniele(at)orlandi(dot)com|Test BUG
(1 row)
tacacs=> SELECT id,status,version,email,sdescr FROM bugdb WHERE lower(status) =
'open' ORDER BY id;
id|status|version|email|sdescr
--+------+-------+-----+------
(0 rows)
tacacs=> SELECT id,status,version,email,sdescr FROM bugdb WHERE lower(status) =
'open ' ORDER BY id;
id|status | version|email |sdescr
--+----------------+----------------+-------------------+--------
1|open |3.0.0 |daniele(at)orlandi(dot)com|Test BUG
(1 row)
As you may see, LOWER(status) matches only 'open ', not 'open'.
Is it the correct behaviour of LOWER() when applied to fixed size fields ?
Regards.
--
Daniele
-------------------------------------------------------------------------------
"I'd crawl over an acre of 'Visual This++' and 'Integrated Development
That' to get to gcc, Emacs, and gdb. Thank you."
(By Vance Petree, Virginia Power)
-------------------------------------------------------------------------------
Se telecom italia aggiungesse uno scatto al giorno ad ogni abbonato, dal
primo Gennaio avrebbe rubato 668.954.000.000 Lire.
-------------------------------------------------------------------------------
Daniele Orlandi - Utility Line Italia - http://www.orlandi.com
Via Mezzera 29/A - 20030 - Seveso (MI) -
From | Date | Subject | |
---|---|---|---|
Next Message | James Boorn | 1998-07-30 16:02:10 | Re: [GENERAL] Strange behaviour ? |
Previous Message | Maarten Boekhold | 1998-07-30 09:46:34 | User authentication blues |