There are a number of internal callers of LOWER(), and conceptually
those should all be using CASEFOLD(). Patches attached.
I'm not sure if we want the citext patch -- it would require REINDEX of
all existing citext indexes after upgrade, and there's already a
documented tip ("Consider using nondeterministic collations...), so
perhaps it's a legacy extension anyway.
It would be nice to make the tsearch change this release, as there are
already changes that could require a reindex.
I didn't change pg_trgm yet, because I think that we have to change the
regex machinery to be aware of more than two case variants first (and
potentially increasing string lengths, too).
Regards,
Jeff Davis