I’m getting a org.postgresql.util.PSQLException: ERROR: operator does not exist: enum_social_network = character varying
when I try to query with an enum like so
SELECT * from accounts where social_network = :social-network::enum_social_network;
how can I do that?
here’s my enum definition create type enum_social_network as enum ('facebook', 'twitter', 'instagram');
If I just run SELECT * from accounts where social_network = 'twitter'::enum_social_network;
directly into a SQL console, it works as expected
SELECT * from accounts where social_network::text = :social-network;
seems to work
casting the otherside…