Re: Suboptimal evaluation of CASE expressions - Mailing list pgsql-hackers

From Andreas Tille
Subject Re: Suboptimal evaluation of CASE expressions
Date
Msg-id Pine.LNX.4.62.0604112319170.3562@wr-linux02
Whole thread Raw
In response to Re: Suboptimal evaluation of CASE expressions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Suboptimal evaluation of CASE expressions
Re: Suboptimal evaluation of CASE expressions
List pgsql-hackers
On Tue, 11 Apr 2006, Tom Lane wrote:

> We could maybe change things so that the finalfunc isn't run unless the
> result value is actually demanded in the SELECT list or HAVING clause,
> but for 99.99% of applications checking that would be a waste of cycles,
> so I'm disinclined to do it.

I'm lacking experience here so I perfectly trust you that keeping
the default case as it is.  The question is, whether adding an
option to change the default might make sense.

> As Martijn said, really you want to fix
> the finalfunc so that it behaves sanely in corner cases.  An aggregate
> that fails on zero rows needs work, period.

Fully ACK.  As I hopefully made clear I just used it as a sign /
proof, that something works differently than I would regard reasonable
(before I understand the problem with the aggregate).

Kind regards
          Andreas.

-- 
http://fam-tille.de


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: plpgsql by default
Next
From: Mischa Sandberg
Date:
Subject: Re: plpgsql by default