summaryrefslogtreecommitdiff
path: root/src/backend/utils/cache/funccache.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-09-20 12:44:52 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-09-20 12:44:52 -0400
commit1eccb93150707acfcc8f24556a15742a6313c8ac (patch)
treec703a4dcff33412e86fb89c890cfd48c6995c98f /src/backend/utils/cache/funccache.c
parent18cdf5932a279a2c035d44460e1e0cbb659471f2 (diff)
Re-allow using statistics for bool-valued functions in WHERE.
Commit a391ff3c3, which added the ability for a function's support function to provide a custom selectivity estimate for "WHERE f(...)", unintentionally removed the possibility of applying expression statistics after finding there's no applicable support function. That happened because we no longer fell through to boolvarsel() as before. Refactor to do so again, putting the 0.3333333 default back into boolvarsel() where it had been (cf. commit 39df0f150). I surely wouldn't have made this error if 39df0f150 had included a test case, so add one now. At the time we did not have the "extended statistics" infrastructure, but we do now, and it is also unable to work in this scenario because of this error. So make use of that for the test case. This is very clearly a bug fix, but I'm afraid to put it into released branches because of the likelihood of altering plan choices, which we avoid doing in minor releases. So, master only. Reported-by: Frédéric Yhuel <frederic.yhuel@dalibo.com> Author: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/a8b99dce-1bfb-4d97-af73-54a32b85c916@dalibo.com
Diffstat (limited to 'src/backend/utils/cache/funccache.c')
0 files changed, 0 insertions, 0 deletions