Is is possible to convert an enum declared in a postgresql schema to text so that I could use like clause for the enum column?
You can cast the enum into text
easily and use any textual operators on it.
select * FROM table WHERE enumfield::text LIKE 'Some%';
There might be a better way to handle what you want to achieve though since the performance of this isn't the best.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With