Re: BUG #14301: function in case expression called when it should not be

From: Rikard Pavelic <rikard(at)ngs(dot)hr>
To: David Fetter <david(at)fetter(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14301: function in case expression called when it should not be
Date: 2016-08-29 20:53:04
Message-ID: 20160829225304.00004ba6@ngs.hr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 29 Aug 2016 13:44:19 -0700
David Fetter <david(at)fetter(dot)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/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message chenkaijiang 2016-08-30 06:48:58 BUG #14302: SQL with LIMIT degrades performance seriously
Previous Message David Fetter 2016-08-29 20:44:19 Re: BUG #14301: function in case expression called when it should not be