Re: [HACKERS] Implementing STDDEV and VARIANCE

Поиск
Список
Период
Сортировка
От Don Baccus
Тема Re: [HACKERS] Implementing STDDEV and VARIANCE
Дата
Msg-id 3.0.1.32.20000123210213.010588a0@mail.pacifier.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Implementing STDDEV and VARIANCE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
At 11:27 PM 1/23/00 -0500, Tom Lane wrote:

>Right, that's pretty much what I'm visualizing.  One minor detail: there
>is not an "agginitfunction", there is an "agginitvalue".  So your
>special datatype to hold n/sx/sx2 must have at least a typinput function
>that can convert the text string held in pg_aggregate into the desired
>internal form of the initial state.  (At least, that's how it's done
>now.  Do you want to argue to change it?  As long as we're opening up
>the AGG design for reconsideration, we could revisit that choice too.)

At the moment I have a hard time visualizing an aggregate function where
a constant initializer wouldn't serve, but ... what would be the cost of
the generalization?  It would only be called once per query or subquery
containing the aggregate, right?  

If generalizing it can be done over a latte or mocha, perhaps it's worth
doing.  If it takes as long as drinking a pint of Guiness, perhaps not :)

(I mean, let's get into meaningful metrics here!)



- Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert
Serviceand other goodies at http://donb.photo.net.
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: ORDBMS<->OID (Re: [HACKERS] Happy column dropping)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Happy column dropping