From 3f190f67eb45ae61d696fbce8ab48d246a12f709 Mon Sep 17 00:00:00 2001
From: Alvaro Herrera
Date: Fri, 27 Feb 2015 18:38:33 -0300
Subject: Fix table_rewrite event trigger for ALTER TYPE/SET DATA TYPE CASCADE
When a composite type being used in a typed table is modified by way
of ALTER TYPE, a table rewrite occurs appearing to come from ALTER TYPE.
The existing event_trigger.c code was unable to cope with that
and raised a spurious error. The fix is just to accept that command
tag for the event, and document this properly.
Noted while fooling with deparsing of DDL commands. This appears to be
an oversight in commit 618c9430a.
Thanks to Mark Wong for documentation wording help.
---
doc/src/sgml/event-trigger.sgml | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
(limited to 'doc')
diff --git a/doc/src/sgml/event-trigger.sgml b/doc/src/sgml/event-trigger.sgml
index 04353eac3d7..f151eb73754 100644
--- a/doc/src/sgml/event-trigger.sgml
+++ b/doc/src/sgml/event-trigger.sgml
@@ -68,12 +68,11 @@
The table_rewrite> event occurs just before a table is
- rewritten by the command ALTER TABLE. While other
+ rewritten by some actions of the commands ALTER TABLE> and
+ ALTER TYPE>. While other
control statements are available to rewrite a table,
like CLUSTER and VACUUM,
- the table_rewrite> event is currently only triggered by
- the ALTER TABLE command, and only when that command
- attempts to rewrite the table.
+ the table_rewrite> event is not triggered by them.
@@ -318,7 +317,7 @@
X
X
-
- -
+ X
--
cgit v1.2.3