PostgreSQL Triggers Part 1


Article Overview

In this article we will cover the following topics:

Database trigger and concept Types of triggers PostgreSQL trigger vs SQL Server trigger key differences PostgreSQL trigger operations overview Access Trigger via pgAdmin and psql What is a Database Trigger?

A Trigger is a block of code that is automatically executed after some operation is performed on a database table or view, precisely after an Insert, Update, Delete operation. For example in a banking application, a trigger can be used to insert data in the history/audit table for all the original transactions taking place.

Some Key Points: