From: | Troels Arvin <troels(at)arvin(dot)dk> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | 7.4: CHAR padding inconsistency |
Date: | 2003-11-19 02:55:09 |
Message-ID: | pan.2003.11.19.02.55.07.726305@arvin.dk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Hello,
I read about the padding-of-CHAR-values changes in the release notes for
7.4.
Making PostgreSQL less standard compliant is sad; I also disagree
with the statement that trimming of trailing white-space is what people
expect.
What's worse, and this may be classified as an error:
create table chartest(col char(10) not null);
insert into chartest values ('AAA');
select character_length(col) from chartest;
character_length
------------------
10
select character_length(col || 'hey') from chartest;
character_length
------------------
6
SELECT CHARACTER_LENGTH(col) <
CHARACTER_LENGTH(col||'hey') from chartest;
?column?
----------
f
The last two results are horrifying, in my opinion, especially when you
consider them in concert: Concatenating a value with another value
decreases its length...
--
Greetings from Troels Arvin, Copenhagen, Denmark
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-11-19 19:50:24 | Re: 7.4: CHAR padding inconsistency |
Previous Message | Kris Jurka | 2003-11-19 00:45:37 | Re: Build problems for PostgreSQL v7.4 on FreeBSD v4.1 |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2003-11-19 04:53:12 | Re: Is there going to be a port to Solaris 9 x86 in the |
Previous Message | Sailesh Krishnamurthy | 2003-11-19 02:32:24 | Re: Is there going to be a port to Solaris 9 x86 in the |