Re: ENABLE/DISABLE CONSTRAINT NAME - Mailing list pgsql-hackers

From Tom Lane
Subject Re: ENABLE/DISABLE CONSTRAINT NAME
Date
Msg-id 4993.1377869247@sss.pgh.pa.us
Whole thread Raw
In response to ENABLE/DISABLE CONSTRAINT NAME  (wangshuo@highgo.com.cn)
Responses Re: ENABLE/DISABLE CONSTRAINT NAME  (Fabien COELHO <coelho@cri.ensmp.fr>)
Re: ENABLE/DISABLE CONSTRAINT NAME  (wangshuo@highgo.com.cn)
List pgsql-hackers
wangshuo@highgo.com.cn writes:
>        In order to achieve enable/disable constraint name,I made ​​a few 
> modifications to the code.
>        First, someone used to build the constraints while building 
> table. Then inserting data must follow a certain order.
>        And people usually like to insert the data but not affected by 
> foreign keys or check.
>        Second, the check or the foreign key constraint will waste much 
> time while inserting the data into the table.
>        Due to the above reasons,I realized this command.

Uh ... why not just drop the constraint, and re-add it later if you want
it again?  This seems like adding a lot of mechanism (and possible bugs)
for a rather marginal use-case.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Next
From: Andres Freund
Date:
Subject: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])