3 ms·
I think you would need a way to trigger the cast either way? Eg concatenate with a string? Otherwise, maybe a function and a generated column (Ed: in a VIEW i
by e12e 3y ago
I think you would need a way to trigger the cast either way? Eg concatenate with a string?
Otherwise, maybe a function and a generated column (Ed: in a VIEW i guess, if it chokes on the raw enum)?
https://dba.stackexchange.com/questions/276477/immutably-convert-enum-to-string https://dba.stackexchange.com/questions/276477/immutably-con...
- aidos 3y agoBy the time you've done a generated column you might as well go with the articles solution of using text with a check constraint since you're now using the space anyway.