Is there a simple ignore-case-comparison for PostgreSQL?
I want to replace:
SELECT id, user_name
FROM users
WHERE lower(email) IN (lowe
select *
where email ilike 'me@example.com'
ilike is similar to like but case insensitive. For escape character use replace()
where email ilike replace(replace(replace($1, '~', '~~'), '%', '~%'), '_', '~_') escape '~'
or you could create a function to escape text; for array of text use
where email ilike any(array['adamB@a.com', 'eveA@b.com'])