Re: Feedback from LinuxWorld, London - Mailing list pgsql-advocacy

From Martín Marqués
Subject Re: Feedback from LinuxWorld, London
Date
Msg-id 200510101824.55501.martin@bugs.unl.edu.ar
Whole thread Raw
In response to Re: Feedback from LinuxWorld, London  ("Jim C. Nasby" <jnasby@pervasive.com>)
Responses Re: Feedback from LinuxWorld, London
List pgsql-advocacy
El Lun 10 Oct 2005 16:42, Jim C. Nasby escribió:
> >
> > Couldn't these features be mostly added as a 'MySQL Compatibility add-on'?
> > For instance, the enum type you list above ... ?
>
> There's issues with doing that. I know one problem is that you currently
> can't pass parameters in when you define a column in a table, which you
> need to be able to do for an enum.
>
> But like I said, if we want to improve migration we should find out
> where the users have pain and concentrate on that. That was actually the
> context of the enum discussion. I threw enum out as an example and
> everyone latched onto it, missing the overall point of trying to improve
> migration from MySQL.

The enum data type is just useless in most cases, and most MySQL programmers
use enum as a way to store booleans. Nothing more, and nothing less.

Just yeasterday somebody was asking about what to do with a field defined as
CHAR(2) loaded with 'Si' and 'No' (Yes and No in spanish). Ofcourse, when I
told him about boolean, and the posibility of easily transforming the bool
variable into a 'Si' or 'No' chain using CASE. Now the problem is that these
people don't know about the diferent data types, and what's worst, some don't
have a clue on good database design.

In my years of database programmer I have had to migrate a par of systems
working on MySQL, and I have to say that whenever I saw an enum data type, I
turned it to a boolean, and it allways would have been the best idea in the
first hand (ofcourse, the original programmer couldn't do so, as MySQL didn't
have the boolean data type).

I know that enum could be used in a lot of other ways, but for what I see,
everybody uses it as a replacement for boolean.

--
select 'mmarques' || '@' || 'unl.edu.ar' AS email;
---------------------------------------------------------
Martín Marqués          |   Programador, DBA
Centro de Telemática    |     Administrador
               Universidad Nacional
                    del Litoral
---------------------------------------------------------

pgsql-advocacy by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Feedback from LinuxWorld, London
Next
From: Simon Riggs
Date:
Subject: Re: Feedback from LinuxWorld, London