An email system that guarantees case-insensitive email addresses can still fail during comparisons of lowercase-to-lowercase, due to international encodings, locales, I18N, L10N, etc.
Pseudocode:
string-compare-case-insensitive(x, y) => true // Right way
string-compare(lower(x), lower(y)) => false // Wrong way
It turns out this issue is called a "case folding non-deterministic" error, and is a broader issue with strings in general.For more about "case folding" with Unicode: http://www.unicode.org/Public/UNIDATA/CaseFolding.txt
For more about "non-deterministic" comparisons: https://www.postgresql.org/docs/current/collation.html#COLLA...