pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Nikhil Ingale <niks.bgm@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: Disable unique constraint in Postgres
Date: Fri, 25 Nov 2022 08:46:22 +0100
Message-ID: <41b12ce3422cf41b050bcb359e45cc453d753c8e.camel@cybertec.at> (raw)
In-Reply-To: <CALXkTpyQXcT5m7cYttWjLv3n8xGC+MFYVah-q9Lxz-8FKBoMmg@mail.gmail.com>
References: <CALXkTpyQXcT5m7cYttWjLv3n8xGC+MFYVah-q9Lxz-8FKBoMmg@mail.gmail.com>

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





view thread (9+ messages)  latest in thread

Message-ID: <41b12ce3422cf41b050bcb359e45cc453d753c8e.camel@cybertec.at>
Permalink:  ../41b12ce3422cf41b050bcb359e45cc453d753c8e.camel@cybertec.at/
Also on:    postgresql.org/message-id/41b12ce3422cf41b050bcb359e45cc453d753c8e.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, niks.bgm@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Disable unique constraint in Postgres
  In-Reply-To: <41b12ce3422cf41b050bcb359e45cc453d753c8e.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox