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.