Saturday, 28 September 2013

Case insensitive array contains query in Postgres

Case insensitive array contains query in Postgres

I would like to match {TEST@EXAMPLE.COM} with {test@example.com,
other@example.com}
Doing the case sensitive query is each enough:
select * from users where email @> '{test@example.com}'
However, I cannot find a way to run a case insensitive contains query
against an array column.
This page does not instill confidence that this is possible, as there is
no mention of case sensitivity. Any thoughts?

No comments:

Post a Comment