Re: Count of records in a row - Mailing list pgsql-general

From Rémi Cura
Subject Re: Count of records in a row
Date
Msg-id CAJvUf_vgJdwaFyi8FXoifqgeDsyaEQDNpojhV5+oV0m6PvKSEQ@mail.gmail.com
Whole thread Raw
In response to Re: Count of records in a row  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: Count of records in a row
List 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

pgsql-general by date:

Previous
From: Amit Langote
Date:
Subject: Re: A client and server encoding question
Next
From: Merlin Moncure
Date:
Subject: Re: Count of records in a row