Re: Disable unique constraint in Postgres

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Nikhil Ingale <niks(dot)bgm(at)gmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Disable unique constraint in Postgres
Date: 2022-11-25 07:46:22
Message-ID: 41b12ce3422cf41b050bcb359e45cc453d753c8e.camel@cybertec.at
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Dhirendra Singh 2022-11-25 08:50:13 Re: Difference between host, hostssl and hostnossl connection type
Previous Message Laurenz Albe 2022-11-25 07:44:51 Re: Difference between host, hostssl and hostnossl connection type