When developing against a PostgreSQL database, many times you will use SQL from your applications, but sometimes you need more. You might need to run some of your logic on the database server for performance or you may want to just create some server-side functions to simplify your application development. There is an infinite number of reasons why you would want to write some code that runs on the PostgreSQL server and PostgreSQL has a rich set of options when you want to do that, but most times, you will use PL/pgSQL. The primary objective of this tutorial is to introduce you to the PostgreSQL PL/pgSQL programming language and to give you the practical skills to be a productive developer working with PostgreSQL databases.
In the course of this tutorial, you will be introduced to a variety of fundamental PL/pgSQL functions like:
* How to declare and use PL/SQL Variables
* How to create functions and procedures
* How to write triggers
* Handle run time errors
And much more...