"=?iso-8859-2?B?U1rbQ1MgR+Fib3I=?=" <surrano(at)mailbox(dot)hu> writes:
> CONCLUSION: I think both the optimizer, both the side effects would be
> happier if all of COALESCE's expressions were only calculated once.
Yup, and NULLIF too. Want to submit a patch? Look for CaseExpr in the
sources, copy/paste/modify.
regards, tom lane