From: Rikard Pavelic <rikard@ngs.hr>
To: David Fetter <david@fetter.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14301: function in case expression called when it should not be
Date: Mon, 29 Aug 2016 22:53:04 +0200
Message-ID: <20160829225304.00004ba6@ngs.hr> (raw)
In-Reply-To: <20160829204419.GF29482@fetter.org>
References: <20160829151433.15676.91530@wrigleys.postgresql.org>
<20160829204419.GF29482@fetter.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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/
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: rikard@ngs.hr, david@fetter.org
Subject: Re: BUG #14301: function in case expression called when it should not be
In-Reply-To: <20160829225304.00004ba6@ngs.hr>
References: <20160829151433.15676.91530@wrigleys.postgresql.org> <20160829204419.GF29482@fetter.org> <20160829225304.00004ba6@ngs.hr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox