Re: ENABLE/DISABLE CONSTRAINT NAME

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: wangshuo(at)highgo(dot)com(dot)cn, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ENABLE/DISABLE CONSTRAINT NAME
Date: 2013-08-30 18:57:45
Message-ID: alpine.DEB.2.02.1308302052500.14562@localhost6.localdomain6
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> Uh ... why not just drop the constraint, and re-add it later if you want
> it again?

My 0.02€ : maybe because you must keep track of the constraint details to
do so, this it is significantly more error prone than disable / enable
when the bookkeeping is done by the system and if everything is in a
transaction... If the ENABLE is automatically done on the next COMMIT,
that would be even better.

> This seems like adding a lot of mechanism (and possible bugs) for a
> rather marginal use-case.

That is possible!

--
Fabien.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2013-08-30 19:27:29 Re: [v9.4] row level security
Previous Message Andres Freund 2013-08-30 18:34:37 Re: Freezing without write I/O