Re: BUG #2106: EXPLAIN ANALYZE with SELECT query causes a single backend server process to segfault

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: bugrep(at)oldanygroup(dot)cz, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2106: EXPLAIN ANALYZE with SELECT query causes a single backend server process to segfault
Date: 2005-12-10 19:25:17
Message-ID: 22988.1134242717@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael Fuhr <mike(at)fuhr(dot)org> writes:
> CREATE TABLE foo (x integer);

> EXPLAIN
> SELECT CASE x = 1 WHEN true THEN 1 ELSE 0 END AS y
> FROM foo
> ORDER BY y;

Fixed, but this is a bit too late for 8.1.1. Meanwhile the easy way to
avoid the bug is to write the CASE in a less obtuse form, like
CASE WHEN x = 1 THEN 1 ELSE 0 END
or
CASE x WHEN 1 THEN 1 ELSE 0 END

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tony S 2005-12-11 23:44:59 BUG #2107: Function INOUT parameter not returned to caller, causes plpgsql malfunctions
Previous Message Qingqing Zhou 2005-12-10 19:12:57 Re: pgsql8.1: About COPY Command and system clomn oid