can we mark upper/lower/textlike functions leakproof?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: can we mark upper/lower/textlike functions leakproof?
Date: 2024-07-30 21:35:27
Message-ID: fa7903f6-b050-4c62-aa52-6f6d5d345770@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-07-30 21:54:54 Re: Popcount optimization using AVX512
Previous Message Nathan Bossart 2024-07-30 21:32:07 Re: Popcount optimization using AVX512