# Deferrable SQL Constraints in Depth

DevFeed: [Deferrable SQL Constraints in Depth](<https://devfeed.tech/articles/deferrable-sql-constraints-in-depth-21477.md>)

Original publisher: [Read original article](<https://begriffs.com/posts/2017-08-27-deferrable-sql-constraints.html>)

Published: 2017-08-27T00:00:00Z

Content type: tutorial

Language: en

Sources: [Joe Nelson](<https://devfeed.tech/sources/joe-nelson.md>)

Topics: [Databases](<https://devfeed.tech/topics/databases.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Transactions](<https://devfeed.tech/topics/transactions.md>)

Tags: [2017](<https://devfeed.tech/tags/2017.md>), [automatic](<https://devfeed.tech/tags/automatic.md>), [database](<https://devfeed.tech/tags/database.md>), [databases](<https://devfeed.tech/tags/databases.md>), [errors](<https://devfeed.tech/tags/errors.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [procedural](<https://devfeed.tech/tags/procedural.md>), [relational-databases](<https://devfeed.tech/tags/relational-databases.md>), [sql](<https://devfeed.tech/tags/sql.md>), [transactions](<https://devfeed.tech/tags/transactions.md>)

## AI overview

An in-depth explanation of deferrable SQL constraints, focusing on how PostgreSQL lets transactions postpone constraint checks while preserving data correctness.

## Source excerpt

2017-08-27 One strength of relational databases is their constant vigilance over data correctness. The user can declare constraints that their data must obey, and then leave it to the database to enforce the rules. This saves a lot of procedural application code and potential errors. Automatic constraint enforcement is a powerful feature, and should be leveraged whenever possible. However there are times when it is convenient - and even necessary - to temporarily defer enforcement.