Re: ENABLE/DISABLE CONSTRAINT NAME

From: wangshuo(at)highgo(dot)com(dot)cn
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: David Johnston <polobo(at)yahoo(dot)com>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Jeff Davis <pgsql(at)j-davis(dot)com>
Subject: Re: ENABLE/DISABLE CONSTRAINT NAME
Date: 2013-09-11 05:09:12
Message-ID: 6959ea807ca0c9b5f774c4573e231352@highgo.com.cn
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

于 2013-09-09 20:54, Peter Eisentraut 回复:
> On 9/3/13 3:13 AM, wangshuo(at)highgo(dot)com(dot)cn wrote:
>> Drop/build and disable/enable constraint has no fundamental
>> difference,
>> and could achieve the same purpose.What I do also more convenient
>> for
>> the user.
>> Recording the disabled constraints is easier than recoding all the
>> constrains.
>

Peter Eisentraut wrote:
> Note that other schema objects can depend on the existence of
> constraints. For example, the validity of a view might depend on the
> existence of a primary key constraint. What would you do with the
> view
> if the primary key constraint is temporarily disabled?
>

Thanks for your reply.
I could't clearly understand your opinion, could you give me more
information or example?

>> What's more, a lot of people ever asked about turing off constraint
>> and
>> The sql2008 support this.So I think it's necessary in some ways.
>
> I don't see this in the SQL standard. There is [NOT] ENFORCED, but
> that's something different. Implementing that instead might actually
> address the above concern.

You are right. I had checked the SQL standard. There is not
ENABLE/DISABLE.
Sorry.
I misunderstood the former discussion about the constraint and the SQL
standard.
Thanks ,again.

Wang Shuo
HighGo Software Co.,Ltd.
September 11, 2013

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2013-09-11 05:25:34 Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE
Previous Message Tatsuo Ishii 2013-09-11 05:00:22 Re: Question regarding Sync message and unnamed portal