Hi all,
I know that Postgres' enum_in()/enum_out() functions have a volatility class of STABLE, and STABLE is required because
enumelements can be renamed. We have an enum in our database used in a number of custom functions, all of which require
castingthe enum to/from text. Since enum_in() and enum_out() are STABLE, that means our functions that rely on those
castsmust also be STABLE, and as a result we can't use them in generated columns.
I have seen conversations that suggest creating a custom IMMUTABLE function to perform the cast, but I can't figure out
howto do that except with a CASE statement that enumerates every possible value. Is there a more elegant approach?
Thanks
Philip