DEV Community

The performance cost of pl/pgsql exception block in Postgres

Serpent7776 on January 29, 2024

One of the languages that Postgres offers for writing stored procedures is pl/pgsql. One of it's features is exception block that is used to catch ...
Collapse
 
franckpachot profile image
Franck Pachot

With an exception block PostgreSQL takes a savepoint before in order to rollback when entering the exception block, and savepoints are quite expensive in current versions of PostgreSQL