diff --git a/doc/src/sgml/event-trigger.sgml b/doc/src/sgml/event-trigger.sgml index c10627554bd..1197de78d02 100644 --- a/doc/src/sgml/event-trigger.sgml +++ b/doc/src/sgml/event-trigger.sgml @@ -147,13 +147,15 @@ table_rewrite - The table_rewrite event occurs just before a table is - rewritten by some actions of the commands ALTER TABLE and - ALTER TYPE. While other - control statements are available to rewrite a table, + The table_rewrite event occurs just before a table or + materialized view is rewritten by some actions of the commands + ALTER TABLE and ALTER MATERIALIZED VIEW. + It can also be triggered by ALTER TYPE when a change to + a composite type causes one of its typed tables to be rewritten. + While other control statements are available to rewrite a relation, like CLUSTER and VACUUM, the table_rewrite event is not triggered by them. - To find the OID of the table that was rewritten, use the function + To find the OID of the relation being rewritten, use the function pg_event_trigger_table_rewrite_oid(), to discover the reason(s) for the rewrite, use the function pg_event_trigger_table_rewrite_reason() (see