Re: [HACKERS] array_accum aggregate

2006-10-09 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: Stephen Frost [EMAIL PROTECTED] writes: I was hoping to do that, but since it's an aggregate the ffunc format is pre-defined to require accepting the 'internal state' and nothing else, and to return 'anyelement' or 'anyarray' one of the inputs must be

Re: [HACKERS] array_accum aggregate

2006-10-09 Thread Stephen Frost
* Stephen Frost ([EMAIL PROTECTED]) wrote: I'm going to be running a very large query shortly using this aaccum and will report back how it goes. It went *very* well, actually much better than I had originally expected. This query used to take over 12 hours to complete (about 11 of which was

Re: [HACKERS] array_accum aggregate

2006-10-09 Thread Merlin Moncure
On 10/10/06, Stephen Frost [EMAIL PROTECTED] wrote: * Stephen Frost ([EMAIL PROTECTED]) wrote: I'm going to be running a very large query shortly using this aaccum and will report back how it goes. It went *very* well, actually much better than I had originally expected. This query used to

Re: [HACKERS] array_accum aggregate

2006-10-07 Thread Florian G. Pflug
Tom Lane wrote: Stephen Frost [EMAIL PROTECTED] writes: * Tom Lane ([EMAIL PROTECTED]) wrote: It looks like it should work to have just one polymorphic aggregate definition, eg, array_accum(anyelement) returns anyarray. I was hoping to do that, but since it's an aggregate the ffunc format

Re: [HACKERS] array_accum aggregate

2006-10-06 Thread Tom Lane
Stephen Frost [EMAIL PROTECTED] writes: Long story short, I set out to build a faster array_accum. Much to my suprise and delight, we already *had* one. accumArrayResult() and makeArrayResult()/construct_md_array() appear to do a fantastic job. I've created a couple of 'glue'

Re: [HACKERS] array_accum aggregate

2006-10-06 Thread Stephen Frost
* Tom Lane ([EMAIL PROTECTED]) wrote: Stephen Frost [EMAIL PROTECTED] writes: Long story short, I set out to build a faster array_accum. Much to my suprise and delight, we already *had* one. accumArrayResult() and makeArrayResult()/construct_md_array() appear to do a fantastic job.

Re: [HACKERS] array_accum aggregate

2006-10-06 Thread Stephen Frost
* Stephen Frost ([EMAIL PROTECTED]) wrote: For comparison, the new functions run with: time psql -c select aaccum(generate_series) from generate_series(1,100); /dev/null 4.24s real 0.34s user 0.06s system Compared to: time psql -c select

Re: [HACKERS] array_accum aggregate

2006-10-06 Thread Tom Lane
Stephen Frost [EMAIL PROTECTED] writes: * Tom Lane ([EMAIL PROTECTED]) wrote: It looks like it should work to have just one polymorphic aggregate definition, eg, array_accum(anyelement) returns anyarray. I was hoping to do that, but since it's an aggregate the ffunc format is pre-defined to