© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
B. Shaik, D. K. ChemuduruProcedural Programming with PostgreSQL PL/pgSQLhttps://doi.org/10.1007/978-1-4842-9840-4_17

17. Aggregates

Baji Shaik1   and Dinesh Kumar Chemuduru2
(1)
Texas, TX, USA
(2)
Andhra Pradesh, India
 

In the previous chapter, we discussed transaction management and how transactions work within an implicit or explicit transaction. This chapter covers the concepts of writing aggregates in PostgreSQL and demonstrates how to write a custom aggregate. We also discuss the core elements of an aggregate, such as the state transition function and final function.

Custom Aggregate

PL/pgSQL offers a wide range of developer-friendly features and capabilities ...

Get Procedural Programming with PostgreSQL PL/pgSQL: Design Complex Database-Centric Applications with PL/pgSQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.