You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This introduces a new dependency type which marks an object as dependingon an extension, such that if the extension is dropped, the objectautomatically goes away; and also, if the database is dumped, the objectis included in the dump output. Currently the grammar supports this forindexes, triggers, materialized views and functions only, although theutility code is generic so adding support for more object types is amatter of touching the parser rules only.Author: Abhijit Menon-SenReviewed-by: Alexander Korotkov, Álvaro HerreraDiscussion:http://www.postgresql.org/message-id/20160115062649.GA5068@toroid.org
Copy file name to clipboardExpand all lines: doc/src/sgml/ref/alter_index.sgml
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ PostgreSQL documentation
23
23
<synopsis>
24
24
ALTER INDEX [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> RENAME TO <replaceable class="PARAMETER">new_name</replaceable>
25
25
ALTER INDEX [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> SET TABLESPACE <replaceable class="PARAMETER">tablespace_name</replaceable>
26
+
ALTER INDEX <replaceable class="PARAMETER">name</replaceable> DEPENDS ON EXTENSION <replaceable class="PARAMETER">extension_name</replaceable>
26
27
ALTER INDEX [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> SET ( <replaceable class="PARAMETER">storage_parameter</replaceable> = <replaceable class="PARAMETER">value</replaceable> [, ... ] )
27
28
ALTER INDEX [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable> RESET ( <replaceable class="PARAMETER">storage_parameter</replaceable> [, ... ] )
28
29
ALTER INDEX ALL IN TABLESPACE <replaceable class="PARAMETER">name</replaceable> [ OWNED BY <replaceable class="PARAMETER">role_name</replaceable> [, ... ] ]
@@ -82,6 +83,16 @@ ALTER INDEX ALL IN TABLESPACE <replaceable class="PARAMETER">name</replaceable>
82
83
</listitem>
83
84
</varlistentry>
84
85
86
+
<varlistentry>
87
+
<term><literal>DEPENDS ON EXTENSION</literal></term>
88
+
<listitem>
89
+
<para>
90
+
This form marks the index as dependent on the extension, such that if the
91
+
extension is dropped, the index will automatically be dropped as well.
Copy file name to clipboardExpand all lines: doc/src/sgml/ref/alter_trigger.sgml
+19-1Lines changed: 19 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ PostgreSQL documentation
22
22
<refsynopsisdiv>
23
23
<synopsis>
24
24
ALTER TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable> RENAME TO <replaceable class="PARAMETER">new_name</replaceable>
25
+
ALTER TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table_name</replaceable> DEPENDS ON EXTENSION <replaceable class="PARAMETER">extension_name</replaceable>
25
26
</synopsis>
26
27
</refsynopsisdiv>
27
28
@@ -32,7 +33,9 @@ ALTER TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable
32
33
<command>ALTER TRIGGER</command> changes properties of an existing
33
34
trigger. The <literal>RENAME</literal> clause changes the name of
34
35
the given trigger without otherwise changing the trigger
35
-
definition.
36
+
definition. The <literal>DEPENDS ON EXTENSION</literal> clause marks
37
+
the trigger as dependent on an extension, such that if the extension is
38
+
dropped, the trigger will automatically be dropped as well.
36
39
</para>
37
40
38
41
<para>
@@ -70,6 +73,15 @@ ALTER TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable