Dear hackers,
After discussing the issue on irc, it looks like it could be possible
for the planner to use a partial index matching an expression exactly to
estimate its selectivity.
Here is a simplified version (thanks ysch) of the issue I am facing:
https://dbfiddle.uk/flPq8-pj
I have tried using CREATE STATISTICS as well but haven't found a way to
improve the planner estimation for that query.
I have worked around the problem for my specific use case but that
behavior is counter-intuitive, is there any interest in improving it?
Thank you!