Re: Disable unique constraint in Postgres - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Disable unique constraint in Postgres
Date
Msg-id 41b12ce3422cf41b050bcb359e45cc453d753c8e.camel@cybertec.at
Whole thread Raw
In response to Disable unique constraint in Postgres  (Nikhil Ingale <niks.bgm@gmail.com>)
Responses Re: Disable unique constraint in Postgres
List pgsql-admin
On Fri, 2022-11-25 at 12:48 +0530, Nikhil Ingale wrote:
> We have an alter command to disable any constraints in the oracle db. Similarly do we have any
> command to disable the UNIQUE constraint in postgres. Most of the postgres db forum suggests
> dropping the UNIQUE constraint. But, I don't want to drop the constraint here instead just
> disable the unique constraint.
> 
> Need your inputs on the same.

The db forums were right: you cannot disable a unique constraint in PostgreSQL.

Yours,
Laurenz Albe



pgsql-admin by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Difference between host, hostssl and hostnossl connection type
Next
From: Dhirendra Singh
Date:
Subject: Re: Difference between host, hostssl and hostnossl connection type