PL/pgSQL

The PL/pgSQL language is the default language typically used to perform server-side programming. It combines the ease of SQL with the power of a scripting language.

With PL/pgSQL, it is possible to build custom functions, operators, and triggers. A standard use might be to incorporate commonly called queries inside the database. Many RDBMSs refer to this as stored-procedures, and it offers a way for client applications to quickly request specific database services without the need for a lengthy communication transaction to occur. The overhead involved in establishing a conversation between a client and server machine can often significantly slow down the apparent speed of the system.

When a PL/pgSQL-based function is created, it is ...

Get PostgreSQL Essential Reference 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.