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

From Tom Lane
Subject Re: Suboptimal evaluation of CASE expressions
Date
Msg-id 11081.1144791266@sss.pgh.pa.us
Whole thread Raw
In response to Re: Suboptimal evaluation of CASE expressions  (Andreas Tille <tillea@rki.de>)
List pgsql-hackers
Andreas Tille <tillea@rki.de> writes:
> 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.

I don't think so.  The current API contract for aggregate functions is
that the finalfunc will be called exactly once per aggregate occurrence.
Changing that to say "maybe you'll get called and maybe you won't" does
not strike me as making life easier for aggregate authors, rather the
reverse --- for example, the finalfunc might need to clean up some
working state.
        regards, tom lane


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: plpgsql by default
Next
From: "Jim C. Nasby"
Date:
Subject: Re: How to implement oracle like rownum(function or seudocolumn)