I have created a custom data type enum like so:
create type "bnfunctionstype" as enum (
normal ,
library ,
import ,
thunk ,
adjustor_thunk
);
From an external data source I get integers in the range [0,4]. I d like to convert these integers to their corresponding enum values.
How can I do this?
I m using PostgreSQL 8.4.