| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | wangshuo(at)highgo(dot)com(dot)cn |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: ENABLE/DISABLE CONSTRAINT NAME |
| Date: | 2013-08-30 13:27:27 |
| Message-ID: | 4993.1377869247@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
wangshuo(at)highgo(dot)com(dot)cn writes:
> In order to achieve enable/disable constraint nameI 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 reasonsI 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2013-08-30 13:28:12 | Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review]) |
| Previous Message | Stephen Frost | 2013-08-30 13:26:32 | Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review]) |