Bruce Momjian dijo:
> Sure, use CHECK constraints on the column. That is the ANSI standard
> way.
>
> gender CHAR(1) CHECK (gender IN ('M','F')),
That's the solution for the ENUM MySQL datatype, but the SET datatype
allows one to have multiple values in the column (or that's what I
understood in the original message).
In PostgreSQL, you could use an array to store multiple values. I don't
know if one could set up a CHECK constraint so that every element in a
varchar array is checked against a predefined set. Maybe it can be done
at insertion time using a trigger?
--
Alvaro Herrera (<alvherre[a]atentus.com>)
"Ninguna manada de bestias tiene una voz tan horrible como la humana" (Orual)