PostgreSQL User Defined Functions


Overview

In this tutorial we will learn about PostgreSQL user defined functions. The topics covered would be what is a user defined function? How to create and use user defined functions via queries and PgAdmin GUI, their advantages and some examples.

What is a user defined function?

A user defined PostgreSQL function is a group of arbitrary SQL statements designated to perform some task. These functions do not come out of the box and are typically created to handle specific scenarios. It is possible to perform select, insert, update, delete operations within a function. A PostgreSQL function can be created