I can't off the top of my head think of a way to do that with an enum column.
Casting the enum to text seems to work:
EXPLAIN SELECT 1 FROM orders WHERE order_id = 1 AND state = 'WAIT_EVENT'; QUERY PLAN ------------------------------------------------------------------------------------ Index Scan using orders_wait_event_idx on orders (cost=0.12..2.34 rows=1 width=4) Filter: (order_id = 1) (2 rows)
EXPLAIN SELECT 1 FROM orders WHERE order_id = 1 AND state::text = 'WAIT_EVENT'; QUERY PLAN -------------------------------------------------------------------------- Index Scan using orders_pkey on orders (cost=0.42..2.65 rows=1 width=4) Index Cond: (order_id = 1) Filter: ((state)::text = 'WAIT_EVENT'::text) (3 rows)