From: | Rémi Cura <remi(dot)cura(at)gmail(dot)com> |
---|---|
To: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
Cc: | Hubert Lubaczewski <depesz(at)depesz(dot)com>, Robert James <srobertjames(at)gmail(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Count of records in a row |
Date: | 2013-10-22 14:09:12 |
Message-ID: | CAJvUf_vgJdwaFyi8FXoifqgeDsyaEQDNpojhV5+oV0m6PvKSEQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks for this good example Merlin !
I didn't know you could use variable inside custom aggregates, and this
allow to solve the problem!
In my own problem I couldn't use aggregates because
_as it output at most one row, it would have mean a lots of useless
computation (as in this example I guess, (please correct me if it's not the
case) : we do N computations of aggregate , each "using" at most N rows)
_I couldn't cheat with arrays because of cost of
serialization/deserialization
I'll keep in mind this custom aggregate use and try to learn more about it.
Cheers,
Rémi-C
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2013-10-22 14:27:22 | Re: Count of records in a row |
Previous Message | Amit Langote | 2013-10-22 13:55:36 | Re: A client and server encoding question |