On Thu, Oct 27, 2005 at 04:54:36PM -0400, Ted Rolle wrote: > This little snippet is great! The only problem I see is that the enums must > be consistent across all modules. > > What about loading a variable with a "default" value? Then it could be > adjusted to 'play'.
Huh? Sorry, but you completely lost me here... On another note, I noticed that the comparison operators seem to be comparing the underlying numeric value used to store the enum, which is wrong IMO. Consider: ENUM color '"red","blue","green"' CREATE TABLE t (c color); INSERT INTO t VALUES('blue'); INSERT INTO t VALUES('green'); INSERT INTO t VALUES('red'); SELECT c FROM t ORDER BY c; red blue green That seems counter-intuitive. It's also exposing an implimentation detail (that the enum is stored internally as a number). -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend