Re: Adding custom constraints on a postgres database

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Debraj Manna <subharaj(dot)manna(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Adding custom constraints on a postgres database
Date: 2024-02-29 18:26:27
Message-ID: CAKFQuwYej5N-T-6YADf1ZLKAKcQ1Avd7xHozTpcG5g8zY1tNeg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Feb 29, 2024, 11:10 Debraj Manna <subharaj(dot)manna(at)gmail(dot)com> wrote:

> 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.
>

https://www.postgresql.org/docs/current/event-trigger-definition.html

David J.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2024-02-29 18:35:25 Re: Adding custom constraints on a postgres database
Previous Message Debraj Manna 2024-02-29 18:09:45 Adding custom constraints on a postgres database