| From: | Jorge Pereira <jrp(at)ideiaprima(dot)com> |
|---|---|
| To: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
| Subject: | Disabling triggers / constraints |
| Date: | 2004-05-20 18:20:32 |
| Message-ID: | 40ACF6F0.2030602@ideiaprima.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-patches |
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 find it quite useful for loading large sets of data (I make
heavy use of CHECK constraints).
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
| Attachment | Content-Type | Size |
|---|---|---|
| disable.patch | text/plain | 5.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2004-05-20 18:43:01 | Re: Disabling triggers / constraints |
| Previous Message | Tom Lane | 2004-05-20 18:17:51 | Re: Add error-checking to timestamp_recv |