From: | Troels Arvin <troels(at)arvin(dot)dk> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: 7.4: CHAR padding inconsistency |
Date: | 2003-11-20 19:16:44 |
Message-ID: | pan.2003.11.20.19.16.42.163605@arvin.dk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
(I already responded to Bruce, but the response seems to be stuck in some
mailing list, waiting for approval. Trying again:)
On Wed, 19 Nov 2003 14:50:24 -0500, on the BUGS-liste, Bruce Momjian wrote:
> Anyway, what did you want it to output? "AAA hey"? We could do
> that, but I assume most people wouldn't expect that output?
I certainly depends on their background. Personally, the padding
characteristics of the CHAR type was one of the first things about SQL
that I learned (the hard way). Oracle and DB2 people should be used to
PostgreSQL's old behaviour.
The CHAR type may seem strange to some, but they may then just
use VARCHAR.
> How do other databases handle this?
I've started writing about it here:
http://troels.arvin.dk/db/rdbms/#data_types-char
Some of my test-material is also online:
http://troels.arvin.dk/db/tests/chartest-20031119a/
My summary:
With regard to CHAR-handling, PostgreSQL 7.4 is now in opposition to
- previous versions of PostgreSQL; bad enough on its own,
because there doesn't seem to have been a good discussion
about it first - I can only find a few messages about it [1]
- DB2
- Oracle
- MSSQL (which also behaves in a non-standard way,
but different from PostgreSQL 7.4)
7.4 is close to how MySQL works, though.
I'm sorry about not testing this before 7.4 went gold, but I believe that
this is a bug which should be corrected before too much confusion
is created.
Reference 1:
An interesting one is this one:
http://article.gmane.org/gmane.comp.db.postgresql.devel.general/10958/match=char+padding
--
Greetings from Troels Arvin, Copenhagen, Denmark
From | Date | Subject | |
---|---|---|---|
Next Message | Adam Buraczewski | 2003-11-20 21:08:23 | Notes about behaviour of SIMILAR TO operator |
Previous Message | Troels Arvin | 2003-11-20 19:14:11 | Re: [BUGS] 7.4: CHAR padding inconsistency |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-11-20 19:20:24 | Re: [HACKERS] More detail on settings for pgavd? |
Previous Message | Kurt Roeckx | 2003-11-20 19:14:35 | 7.4 logging bug. |