I've been trying to make the following query works, but I couldn't:
SELECT "users".* FROM "users" WHERE (users.roles LIKE "%sales%")
or
SELECT "users".* FROM "users" WHERE (users.roles LIKE '%sales%')
where roles, can contain:
{operations,business_development,sales,customer_service,manager}
and roles is: character varying[]
I'm getting the error:
ERROR: operator does not exist: character varying[] ~~ unknown LINE 1: select users.id from users where users.roles LIKE '%sales%'...
Try
Having said that, it's worth noting:
http://www.postgresql.org/docs/9.5/static/arrays.html