Re: BUG #14301: function in case expression called when it should not be - Mailing list pgsql-bugs

From Rikard Pavelic
Subject Re: BUG #14301: function in case expression called when it should not be
Date
Msg-id 20160829225304.00004ba6@ngs.hr
Whole thread Raw
In response to Re: BUG #14301: function in case expression called when it should not be  (David Fetter <david@fetter.org>)
List pgsql-bugs
On Mon, 29 Aug 2016 13:44:19 -0700
David Fetter <david@fetter.org> wrote:

> This is the expected behavior.  You might look into FILTER clauses in
> your queries, which might be closer to the behavior you want.

Yeah, I realized why it's behaving that way after Tom's answer.
I did not write such horrible code, but I worked around it by repeating
case when within the sum :)

Regards,
Rikard

--
Rikard Pavelic
https://dsl-platform.com/
http://templater.info/

pgsql-bugs by date:

Previous
From: David Fetter
Date:
Subject: Re: BUG #14301: function in case expression called when it should not be
Next
From: chenkaijiang@gmail.com
Date:
Subject: BUG #14302: SQL with LIMIT degrades performance seriously