Re: BUG #12273: CASE Expression BUG

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #12273: CASE Expression BUG
Date: 2014-12-18 20:10:05
Message-ID: 2065.1418933405@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

David Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Thu, Dec 18, 2014 at 10:14 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Hmm ... I'd just been looking at 4.2.14:
>> http://www.postgresql.org/docs/9.4/static/sql-expressions.html#SYNTAX-EXPRESS-EVAL
>> and thinking that maybe it should mention this. Perhaps we ought to
>> relocate the text about constant subexpressions into 4.2.14 (and add an
>> example), and then link there from 9.17.1.

> +1

> Something like:
> Before "A limitation of this technique [...]"
> The are two limitations to this technique: planner optimizations may occur
> and aggregate expressions will be evaluated.

Yeah, I've just been working on some text to put there. I'm still
wordsmithing it, but right now it's as attached.

> The question is how detailed do we need to get here...is it an issue
> specific to casting or is there some other interplay happening?

It's not particularly specific to casting, any constant subexpression that
could throw errors is at risk. I'm using divide-by-zero as the canonical
example in this area.

regards, tom lane

Attachment Content-Type Size
case-docs-fix.patch text/x-diff 3.5 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message greg.davidson 2014-12-18 20:24:23 BUG #12275: configure incorrectly tests libxml2 version
Previous Message David Johnston 2014-12-18 19:40:26 Re: BUG #12273: CASE Expression BUG