pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PostgreSQL - Hans-Jürgen Schönig <postgres@cybertec.at>
To: Andreas Pflug <pgadmin@pse-consulting.de>
Cc: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-bugs@postgresql.org
Subject: Re: char(0)
Date: Mon, 17 Oct 2011 17:11:47 +0200
Message-ID: <DDDC598E-B125-4E66-8B65-2FA907FC3830@cybertec.at> (raw)
In-Reply-To: <4E9C3E94.3020509@pse-consulting.de>
References: <4E9BD9E2.2010305@2ndQuadrant.com>
	<j7gqct$vgm$1@dough.gmane.org>
	<4E9C3E94.3020509@pse-consulting.de>


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




view thread (12+ messages)  latest in thread

Message-ID: <DDDC598E-B125-4E66-8B65-2FA907FC3830@cybertec.at>
Permalink:  ../DDDC598E-B125-4E66-8B65-2FA907FC3830@cybertec.at/
Also on:    postgresql.org/message-id/DDDC598E-B125-4E66-8B65-2FA907FC3830@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: postgres@cybertec.at, pgadmin@pse-consulting.de, spam_eater@gmx.net
  Subject: Re: char(0)
  In-Reply-To: <DDDC598E-B125-4E66-8B65-2FA907FC3830@cybertec.at>
  References: <4E9BD9E2.2010305@2ndQuadrant.com> <j7gqct$vgm$1@dough.gmane.org> <4E9C3E94.3020509@pse-consulting.de> <DDDC598E-B125-4E66-8B65-2FA907FC3830@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox