From: | Troels Arvin <troels(at)arvin(dot)dk> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: 7.4: CHAR padding inconsistency |
Date: | 2003-11-19 22:13:44 |
Message-ID: | pan.2003.11.19.22.13.36.495425@arvin.dk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Wed, 19 Nov 2003 14:50:24 -0500, 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 | ViSolve Open Source Team | 2003-11-20 00:55:26 | (Modified) Patch request for PostgreSQL 7.4 for HP-UX IA-64 |
Previous Message | Alex Albarracin | 2003-11-19 20:26:34 | memory bug |
From | Date | Subject | |
---|---|---|---|
Next Message | Austin Gonyou | 2003-11-19 22:17:34 | Re: Commercial binary support? |
Previous Message | David Fetter | 2003-11-19 22:03:25 | RPM building fun |