Hi,
From what I recall, I came across a blog post quite some time ago that might be helpful for this topic:`https://danolivo.substack.com/p/on-expressions-reordering-in-postgres`
--Regards,Man Zengwww.openhalo.org