> BTW: What about MySQLs enum type? I think this could be emulated in Pg 
> with (var)char + CHECK:
> MySQL: switch enum('off','on') NOT NULL DEFAULT 'off'
> Pg:    switch char(3) NOT NULL CHECK(switch IN (on,off)) DEFAULT 'off'

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. Also, in a
numeric context they evaluate to their internal integer representations,
so if switch=='on' then 0+switch==2. Ech.

http://dev.mysql.com/doc/refman/4.1/en/enum.html

-- 
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
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to