Re: Suboptimal evaluation of CASE expressions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Tille <tillea(at)rki(dot)de>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, PostgreSQL Hacker Liste <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Suboptimal evaluation of CASE expressions
Date: 2006-04-11 21:34:26
Message-ID: 11081.1144791266@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andreas Tille <tillea(at)rki(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-04-11 21:36:04 Re: Suboptimal evaluation of CASE expressions
Previous Message David Fetter 2006-04-11 21:31:14 Re: plpgsql by default