aardvark92
Programmer
I'm moving to PostgreSQL after using MySQL for a few years. One of MySQL's features is an enum data type, which is used to select from a list.
For example, I might declare a field
to limit it to those three values.
I haven't found an exact equivalent in PostgreSQL. Is there one, or do I need to use the CONSTRAINT clause to limit a field's allowed values?
For example, I might declare a field
Code:
rating ENUM("good","fair","poor")
I haven't found an exact equivalent in PostgreSQL. Is there one, or do I need to use the CONSTRAINT clause to limit a field's allowed values?