Subject Re: [Firebird-Architect] datatype "enum"?
Author Martijn Tonies
> are there any plans to integrate a new datatype for enumerations
> ("enum") to Firebird?

I hope not :-)

> MySQL has such a datatype (look at
> http://dev.mysql.com/doc/refman/4.1/en/enum.html)and I think it would
> be a great addition for Firebird.

"enum" actually isn't a datatype at all. It's more of a string
datatype with a set of possible values.

Now, "enum" itself is badly implemented. For example, having an
enum of ('1', '2', '3') sets it to '' if you perform:

update mytable set e = '4'

To get more-or-less the same with Firebird, try this:

create table mytable
(
enum_col varchar(10) check (enum_col in ('1', '2', '3'))
)


With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com