On Wed, 2005-11-30 at 23:43 -0500, John Siracusa wrote:
> On 11/30/05 11:29 PM, Torsten Seemann wrote:
> > Just keep in mind that MySQL 'ENUM' stores them as integers, and that
> > integer is ALWAYS reserved to store the empty string '' as 0. So even if
> > you specify switch ENUM('off','on'), '' will also be valid.
> 
> Er, is that considered a a feature?  I mean, I could specify 99 and get ''
> stored in the db too.  I'm inclined to treat that as invalid input on the
> RDBO side.  I'm not even sure about accepting valid integers.  Isn't the
> whole point to use the symbolic names?

Welcome to MySQL - A database engine that excepts integers as valid ENUM
columns... That's why I switched to PostgreSQL!

My point was just to let you know of some of the wierdness in MySQL ENUM
so you could take care of it on the RDBO side, as you stated. Like
invalid ENUM values being silently mapped to 0 aka ''...

-- 
Torsten Seemann <[EMAIL PROTECTED]>
Victorian Bioinformatics Consortium



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to