From: Scott Ribe <scott_ribe@elevated-dev.com>
To: Samed YILDIRIM <samed@reddoc.net>
Cc: Nikhil Ingale <niks.bgm@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Disable unique constraint in Postgres
Date: Sun, 27 Nov 2022 09:58:54 -0700
Message-ID: <B7F0896B-C1E1-4858-9CC6-A9FAD31727CC@elevated-dev.com> (raw)
In-Reply-To: <CAAo1mbmvoxTcPdBXdAtZ4oPT-kAOouUpKeYDbqbUsJdFc0CsbA@mail.gmail.com>
References: <CALXkTpyQXcT5m7cYttWjLv3n8xGC+MFYVah-q9Lxz-8FKBoMmg@mail.gmail.com>
<CAAo1mbmvoxTcPdBXdAtZ4oPT-kAOouUpKeYDbqbUsJdFc0CsbA@mail.gmail.com>
> On Nov 27, 2022, at 9:51 AM, Samed YILDIRIM <samed@reddoc.net> wrote:
>
> Important point is why you want to disable a unique constraint.
> • If you want to add some duplicate rows into a table, you try to do something fundamentally wrong.
Even more so: why is disabling superior to dropping???
It is at most an extremely minor convenience to be able to re-enable it without having to re-create it, in that you can, presumably, just re-enable by name without specifying the constraint details. In other words, in my opinion, it is a virtually worthless feature. (Typical "enterprise software" feature creep.)
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: scott_ribe@elevated-dev.com, samed@reddoc.net, niks.bgm@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: Disable unique constraint in Postgres
In-Reply-To: <B7F0896B-C1E1-4858-9CC6-A9FAD31727CC@elevated-dev.com>
* 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