"'Andres Freund'" <andres(at)anarazel(dot)de> writes:
> On 2017-06-08 11:57:49 -0400, Regina Obe wrote:
>> My main concern in these cases is the short-circuiting not happening.
> Note there's also no short-circuiting e.g. for aggregates inside case
> either.
Well, depends. If const-folding manages to get rid of the aggregate
call altogether, it won't be computed.
regards, tom lane