Disabling triggers / constraints

Started by Jorge Pereiraabout 22 years ago1 messagespatches
Jump to latest
#1Jorge Pereira
kell_pt@users.sf.net

After trying to do some custom dumping/restoring, and having to resort
to the awful trick of changing the trigger counts on the catalog (the
stuff pg_dump adds), decided to add a couple little variables to control
disabling constraints and triggers. Added them to guc.c so that they
show up in the SET/SHOW list, and added checks accordingly (always at
top level, to avoid unnecessary function calls and loops). Variables are
'disable_constraints' and 'disable_triggers' and they are "false" by
default.

I am unsure wether it is right to send such an uncalled-for patch, but
seeing as this is such a simple thing that can be quite useful (large
volumes of data), I thought it could be useful.

(apply with patch -p0 from the root distro directory)

Cheers
- Jorge Pereira

Attachments:

disable.patchtext/plain; name=disable.patchDownload+29-19