Databases · Middle · Question 70 of 75
What are trade-offs of using a PostgreSQL ENUM type for a status column?
- 1Enums can't be used in
WHERE - 2Enums are slower than text in every case
- ✓Correct answer: Compact and type-safe, but removing or renaming values is awkward; a
CHECKconstraint or a lookup table is easier to change
Explanation
Adding enum values is easy; removing them requires recreating the type. A lookup table can also store extra data like labels or sort order.