can we mark upper/lower/textlike functions leakproof? - Mailing list pgsql-hackers

From Andrew Dunstan
Subject can we mark upper/lower/textlike functions leakproof?
Date
Msg-id fa7903f6-b050-4c62-aa52-6f6d5d345770@dunslane.net
Whole thread Raw
Responses Re: can we mark upper/lower/textlike functions leakproof?
List pgsql-hackers
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




pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Popcount optimization using AVX512
Next
From: Nathan Bossart
Date:
Subject: Re: Popcount optimization using AVX512