Hacker News new | past | comments | ask | show | jobs | submit login

Adding variant cases effectively changes the type of a column, breaking existing clients. So you might as well migrate the existing data to a consistent representation.

Independently of schema evolution, a sum type can be implemented by using different nullable columns, and adding a multi-column CHECK constraint that (one and) only one of those columns must be set. One might want more syntactic sugar in SQL for that, but it would also complicate the language and data model, without really adding any new functionality.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: