Andres Freund <and...@2ndquadrant.com> writes:
> On 2013-06-18 13:17:14 +0000, and...@lombardoni.ch wrote:
>> template1=# SELECT CASE WHEN (SELECT 0)=0 THEN 0 ELSE 1/0 END;
>> ERROR:  division by zero

> Hrmpf. This is rather annoying.

Annoying, maybe.  Bug, no.  The manual is pretty clear that you don't
have a lot of control over order of evaluation of subexpressions.

> So it seems we need to stop processing after finding a single WHEN
> that's not const?

That's not an acceptable "fix".

                        regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to