Several years ago, an EDB customer complained that if they used a
functional index involving upper(), lower(), or textlike(), where RLS
was involved, the indexes were not used because these functions are not
marked leakproof. We presented the customer with several options for
addressing the problem, the simplest of which was simply to mark the
functions as leakproof, and this was the solution they adopted.
The consensus of discussion at the time among our senior developers was
that there was probably no reason why at least upper() and lower()
should not be marked leakproof, and quite possibly initcap() and
textlike() also. It was suggested that we had not been terribly rigorous
in assessing whether or not functions can be considered leakproof.
At the time we should have asked the community about it, but we didn't.
Fast forward to now. The customer has found no observable ill effects of
marking these functions leakproof. The would like to know if there is
any reason why we can't mark them leakproof, so that they don't have to
do this in every database of every cluster they use.
Thoughts?
cheers
andrew
--
Andrew Dunstan
EDB: https://www.enterprisedb.com