Out of date docs: DISABLE/ENABLE TRIGGER
Hi,
I just spotted that the docs for ALTER TABLE .. DISABLE/ENABLE TRIGGER
are out of date, now that we have deferrable uniqueness and exclusion
constraints.
Also, I think that the original comment in the ENABLE/DISABLE TRIGGER
section was misleading because it suggested that only superusers can
disable constraint triggers, which is not true for *user-defined*
constraint triggers.
Proposed update attached.
Regards,
Dean
Attachments:
alter_table_docs.patchapplication/octet-stream; name=alter_table_docs.patchDownload
*** ./doc/src/sgml/ref/alter_table.sgml.orig 2010-06-06 09:16:34.000000000 +0100
--- ./doc/src/sgml/ref/alter_table.sgml 2010-06-06 09:49:00.000000000 +0100
***************
*** 250,257 ****
status is checked when the event occurs, not when the trigger function
is actually executed. One can disable or enable a single
trigger specified by name, or all triggers on the table, or only
! user triggers (this option excludes triggers that are used to implement
! foreign key constraints). Disabling or enabling constraint triggers
requires superuser privileges; it should be done with caution since
of course the integrity of the constraint cannot be guaranteed if the
triggers are not executed.
--- 250,259 ----
status is checked when the event occurs, not when the trigger function
is actually executed. One can disable or enable a single
trigger specified by name, or all triggers on the table, or only
! user triggers (this option excludes internally generated constraint
! triggers such as those that are used to implement foreign key
! constraints or deferrable uniqueness and exclusion constraints).
! Disabling or enabling internally generated constraint triggers
requires superuser privileges; it should be done with caution since
of course the integrity of the constraint cannot be guaranteed if the
triggers are not executed.
***************
*** 585,592 ****
<listitem>
<para>
Disable or enable all triggers belonging to the table.
! (This requires superuser privilege if any of the triggers are for
! foreign key constraints.)
</para>
</listitem>
</varlistentry>
--- 587,596 ----
<listitem>
<para>
Disable or enable all triggers belonging to the table.
! (This requires superuser privilege if any of the triggers are
! internally generated constraint triggers such as those that are used
! to implement foreign key constraints or deferrable uniqueness and
! exclusion constraints.)
</para>
</listitem>
</varlistentry>
***************
*** 596,602 ****
<listitem>
<para>
Disable or enable all triggers belonging to the table except for
! foreign key constraint triggers.
</para>
</listitem>
</varlistentry>
--- 600,608 ----
<listitem>
<para>
Disable or enable all triggers belonging to the table except for
! internally generated constraint triggers such as those that are used
! to implement foreign key constraints or deferrable uniqueness and
! exclusion constraints.
</para>
</listitem>
</varlistentry>
Excerpts from Dean Rasheed's message of dom jun 06 05:11:02 -0400 2010:
Hi,
I just spotted that the docs for ALTER TABLE .. DISABLE/ENABLE TRIGGER
are out of date, now that we have deferrable uniqueness and exclusion
constraints.
applied, thanks
Also, I think that the original comment in the ENABLE/DISABLE TRIGGER
section was misleading because it suggested that only superusers can
disable constraint triggers, which is not true for *user-defined*
constraint triggers.
right.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support