On 26.08.21 16:00, Tom Lane wrote:
Generally speaking, we've been resistant to marking anything leakproof unless it has a very small code footprint that can be easily audited. In particular, anything that shares a lot of infrastructure with not-leakproof functions seems quite hazardous. Even if you go through the code and convince yourself that it's OK today, innocent changes to the shared infrastructure could break the leakproofness tomorrow.
I think the complexity of the implementation of upper() and lower() is on the same order as bttextcmp() and similar, so it wouldn't be totally out of scope.