From: | PostgreSQL - Hans-Jürgen Schönig <postgres(at)cybertec(dot)at> |
---|---|
To: | Andreas Pflug <pgadmin(at)pse-consulting(dot)de> |
Cc: | Thomas Kellerer <spam_eater(at)gmx(dot)net>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: char(0) |
Date: | 2011-10-17 15:11:47 |
Message-ID: | DDDC598E-B125-4E66-8B65-2FA907FC3830@cybertec.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Oct 17, 2011, at 4:41 PM, Andreas Pflug wrote:
> Am 17.10.11 10:53, schrieb Thomas Kellerer:
>> Susanne Ebrecht, 17.10.2011 09:31:
>>> Hello,
>>>
>>> I couldn't find that somebody already mentioned it.
>>>
>>> PostgreSQL isn't supporting CHAR(0).
>>>
>>> An empty string has a length of 0.
>>>
>>> CHAR(0) can have two values: NULL and empty string.
>>>
>>> In MySQL it is very common to simulate not null boolean
>>> by using CHAR(0).
>>>
>>> This is a little bit annoying on migration topics.
>>
>> While not move on to a cleaner approach during the migration and use a
>> "boolean not null"?
>
> Sounds much too straight forward, not mysql-ish artistic enough...
>
> Regards,
> Andreas
yes, if you do proper migration you should try to get rid of stupid design like this..
it is possible to stand on your head actually ... it just makes no sense if you are waiting for the bus.
the fact that mysql has something does not implicitly mean that it makes sense to have it as well.
a way to get around it would be ...
CREATE TYPE my_intentionally_broken_type ... ;).
but, i would not see that as recommendation actually :).
regards,
hans
--
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt, Austria
Web: http://www.postgresql-support.de
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-10-17 15:52:48 | Re: BUG #6258: Lock Sequence |
Previous Message | John R Pierce | 2011-10-17 15:04:37 | Re: char(0) |