MySQL behaviour is certainly not correct, or even "correct" in many contexts. It thinks 'a' = 'A' which, in the presence of unique indexes, is just wrong.
Anyway, this is another aspect of a general issue here, which I summarised years ago at https://docs.moodle.org/dev/Database_collation_issue.
I think we should be reluctant to rely on a postgres contrib module - at least requiring it adds a clear cost: it makes Moodle harder to install.
Anyway, this is another aspect of a general issue here, which I summarised years ago at https://docs.moodle.org/dev/Database_collation_issue.
I think we should be reluctant to rely on a postgres contrib module - at least requiring it adds a clear cost: it makes Moodle harder to install.