Adding custom constraints on a postgres database

From: Debraj Manna <subharaj(dot)manna(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Adding custom constraints on a postgres database
Date: 2024-02-29 18:09:45
Message-ID: CAF6DVKMxbfsuK65SgrNdoBnhWdmx86Sku+Th1e5-QQWx_oncRg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Can someone let me know if there is a way I can add some custom
rules/constraints on a Postgres database?

For example, all tables in a database should have a primary key specified.
If someone is trying to violate the rules specified then the SQL command
should fail.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2024-02-29 18:26:27 Re: Adding custom constraints on a postgres database
Previous Message Tom Lane 2024-02-29 17:59:54 Re: pg_dump blocks insert update on table