0001-Document-the-event-trigger-table-rewrite-functions.patch
application/octet-stream
Filename: 0001-Document-the-event-trigger-table-rewrite-functions.patch
Type: application/octet-stream
Part: 0
Patch
Format: format-patch
Series: patch 0001
Subject: Document the event trigger table rewrite functions.
| File | + | − |
|---|---|---|
| doc/src/sgml/event-trigger.sgml | 7 | 0 |
From 4c6356f735d8423dca3b1f1f0719beb0a1a2e77d Mon Sep 17 00:00:00 2001
From: Greg Sabino Mullane <greg@turnstep.com>
Date: Mon, 2 Sep 2024 17:06:40 -0400
Subject: [PATCH] Document the event trigger table rewrite functions.
---
doc/src/sgml/event-trigger.sgml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/doc/src/sgml/event-trigger.sgml b/doc/src/sgml/event-trigger.sgml
index 8e009cca05..57e2051d94 100644
--- a/doc/src/sgml/event-trigger.sgml
+++ b/doc/src/sgml/event-trigger.sgml
@@ -99,6 +99,13 @@
control statements are available to rewrite a table,
like <literal>CLUSTER</literal> and <literal>VACUUM</literal>,
the <literal>table_rewrite</literal> event is not triggered by them.
+ To find the OID of the table that was rewritten, use the function
+ <literal>pg_event_trigger_table_rewrite_oid()</literal>. To discover the
+ reason for the rewrite, use the function
+ <literal>pg_event_trigger_table_rewrite_reason()</literal>. This function returns
+ an integer representing a bitmap of reasons for the rewrite. The current values
+ are 1 (the table has changed persistence), 2 (a column has changed a default value),
+ 3 (a column has a new data type), and 4 (the table access method has changed).
</para>
<para>
--
2.30.2