Re: [HACKERS] Enticing interns to PostgreSQL - Mailing list pgsql-advocacy

From Peter Eisentraut
Subject Re: [HACKERS] Enticing interns to PostgreSQL
Date
Msg-id 200507272005.23533.peter_e@gmx.net
Whole thread Raw
In response to Re: [HACKERS] Enticing interns to PostgreSQL  (Jeff Davis <jdavis-pgsql@empires.org>)
List pgsql-advocacy
Jeff Davis wrote:
> I mostly agree, but I don't think we can dismiss enum completely.
> After all, boolean is pretty much enum(false,true), and nobody would
> advocate removing that type.

I think you can make the mathematical argument that enums are valid and
useful.  I'm not going to do that here, but some thoughts:  As you
point out, any scalar type is really just a set of conveniently chosen
symbols that are made interesting by functions and operators.  In
traditional programming languages as well as in the MySQL case, "enums"
are just a short-hand way to define such a scalar type without any
interesting operators.

Single column tables that merely serve to prove the existence of a
concept are valid if those concepts are part of your data model (who
are my customers?) but not if they are part of the intrinsics that you
base your data model on (these are the colors existing in the physical
world).  The question is where you draw the line.  PostgreSQL gives you
a default line.  In don't think you can operate completely without any
line.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

pgsql-advocacy by date:

Previous
From: Josh Berkus
Date:
Subject: Re: ENUM type
Next
From: Chris Travers
Date:
Subject: MySQL to PostgreSQL, was ENUM type