From: harry.townsend@eflowglobal.com
To: pgsql-bugs@postgresql.org
Subject: BUG #13973: Constants resolved in then/else clauses
Date: Thu, 18 Feb 2016 13:57:55 +0000
Message-ID: <20160218135755.2655.72680@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 13973
Logged by: Harry Townsend
Email address: harry.townsend@eflowglobal.com
PostgreSQL version: 9.1.20
Operating system: Windows Server 2008
Description:
I attempted to create a safety check in a query using a "case when"
statement such that if the condition evaluated to false, it would return (1
/ 0) in order to nullify the entire transaction. With small conditions, this
works fine. With larger ones, it seems that the constants in the "else"
clause (didn't test for "then" clause) are evaluated before the condition,
causing it to fail every time. If the "else" part requires a column value,
it seems to force the condition to evaluate first though.
--
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: harry.townsend@eflowglobal.com
Subject: Re: BUG #13973: Constants resolved in then/else clauses
In-Reply-To: <20160218135755.2655.72680@wrigleys.postgresql.org>
References: <20160218135755.2655.72680@wrigleys.postgresql.org>
* 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