Adding custom constraints on a postgres database - Mailing list pgsql-admin

From Debraj Manna
Subject Adding custom constraints on a postgres database
Date
Msg-id CAF6DVKMxbfsuK65SgrNdoBnhWdmx86Sku+Th1e5-QQWx_oncRg@mail.gmail.com
Whole thread Raw
Responses Re: Adding custom constraints on a postgres database
List 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.

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump blocks insert update on table
Next
From: "David G. Johnston"
Date:
Subject: Re: Adding custom constraints on a postgres database