Stephen R. van den Berg writes:
When looking at the current definition of the addresses table, the following questions come up:

- I notice that the ald index uses lower() on both localpart and domain,
but that the addresses_nld_key unique index only lowers the domain part, yet keeps case for name and the localpart. What is the rationale behind lowering just the domain part in the addresses_nld_key unique index?

Our local addresses are case-insensitive on both sides of the @. Addresses in other domains may not be (don't make me discuss this, or you'll tempt me into ranting and spewing bile). Therefore we have one sensible index (which we used e.g. for search) and one unique (so we can store RFC-conformant addresses even when they're not exactly sanity-conformant).

- Wouldn't it be prudent/sane to either lower both the localpart and
the domain, or not lowering either of them, in the addresses_nld_key unique index?

Regrettably the RFC says differently.

Arnt

Reply via email to