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
CREATE OR REPLACEFUNCTIONpgl_ddl_deploy.common_exclude_alter_table_subcommands()
10
+
RETURNS TEXT[] AS
11
+
$BODY$
12
+
SELECT ARRAY[
13
+
'ADD CONSTRAINT',
14
+
'(re) ADD CONSTRAINT',
15
+
'ALTER CONSTRAINT',
16
+
'VALIDATE CONSTRAINT',
17
+
'ADD (processed) CONSTRAINT',
18
+
'ADD CONSTRAINT (using index)',
19
+
'DROP CONSTRAINT',
20
+
'SET LOGGED',
21
+
'SET UNLOGGED',
22
+
'SET TABLESPACE',
23
+
'SET RELOPTIONS',
24
+
'RESET RELOPTIONS',
25
+
'REPLACE RELOPTIONS',
26
+
'ENABLE TRIGGER',
27
+
'ENABLE TRIGGER (always)',
28
+
'ENABLE TRIGGER (replica)',
29
+
'DISABLE TRIGGER',
30
+
'ENABLE TRIGGER (all)',
31
+
'DISABLE TRIGGER (all)',
32
+
'ENABLE TRIGGER (user)',
33
+
'DISABLE TRIGGER (user)',
34
+
'ENABLE RULE',
35
+
'ENABLE RULE (always)',
36
+
'ENABLE RULE (replica)',
37
+
'DISABLE RULE',
38
+
'SET OPTIONS']::TEXT[];
39
+
$BODY$
40
+
LANGUAGE SQL IMMUTABLE;
41
+
9
42
CREATE OR REPLACEFUNCTIONpgl_ddl_deploy.rewrite_transaction_safe(p_sql text)
10
43
RETURNS text
11
44
LANGUAGE c
@@ -313,7 +346,8 @@ WITH vars AS
313
346
$BUILD$::TEXTAS shared_mixed_obj_logic,
314
347
$BUILD$
315
348
-- Filter out purely PG-internal triggers (alas, "pg_event_trigger_dropped_objects" does not expose "tgisinternal", so we must filter by name)
316
-
(SELECT*FROM pg_event_trigger_dropped_objects() WHERE address_names[array_upper(address_names, 1)] NOT LIKE'RI_ConstraintTrigger_a_%'AND address_names[array_upper(address_names, 1)] NOT LIKE'RI_ConstraintTrigger_c_%')
349
+
-- Also filter out toast tables since if there are any non-toast operations the toast ones are almost certainly internally generated
350
+
(SELECT*FROM pg_event_trigger_dropped_objects() WHERE address_names[array_upper(address_names, 1)] NOT LIKE'RI_ConstraintTrigger_a_%'AND address_names[array_upper(address_names, 1)] NOT LIKE'RI_ConstraintTrigger_c_%'AND schema_name <>'pg_toast')
CREATE OR REPLACEFUNCTIONpgl_ddl_deploy.common_exclude_alter_table_subcommands()
5176
+
RETURNS TEXT[] AS
5177
+
$BODY$
5178
+
SELECT ARRAY[
5179
+
'ADD CONSTRAINT',
5180
+
'(re) ADD CONSTRAINT',
5181
+
'ALTER CONSTRAINT',
5182
+
'VALIDATE CONSTRAINT',
5183
+
'ADD (processed) CONSTRAINT',
5184
+
'ADD CONSTRAINT (using index)',
5185
+
'DROP CONSTRAINT',
5186
+
'SET LOGGED',
5187
+
'SET UNLOGGED',
5188
+
'SET TABLESPACE',
5189
+
'SET RELOPTIONS',
5190
+
'RESET RELOPTIONS',
5191
+
'REPLACE RELOPTIONS',
5192
+
'ENABLE TRIGGER',
5193
+
'ENABLE TRIGGER (always)',
5194
+
'ENABLE TRIGGER (replica)',
5195
+
'DISABLE TRIGGER',
5196
+
'ENABLE TRIGGER (all)',
5197
+
'DISABLE TRIGGER (all)',
5198
+
'ENABLE TRIGGER (user)',
5199
+
'DISABLE TRIGGER (user)',
5200
+
'ENABLE RULE',
5201
+
'ENABLE RULE (always)',
5202
+
'ENABLE RULE (replica)',
5203
+
'DISABLE RULE',
5204
+
'SET OPTIONS']::TEXT[];
5205
+
$BODY$
5206
+
LANGUAGE SQL IMMUTABLE;
5207
+
5175
5208
CREATE OR REPLACEFUNCTIONpgl_ddl_deploy.rewrite_transaction_safe(p_sql text)
5176
5209
RETURNS text
5177
5210
LANGUAGE c
@@ -5479,7 +5512,8 @@ WITH vars AS
5479
5512
$BUILD$::TEXTAS shared_mixed_obj_logic,
5480
5513
$BUILD$
5481
5514
-- Filter out purely PG-internal triggers (alas, "pg_event_trigger_dropped_objects" does not expose "tgisinternal", so we must filter by name)
5482
-
(SELECT*FROM pg_event_trigger_dropped_objects() WHERE address_names[array_upper(address_names, 1)] NOT LIKE'RI_ConstraintTrigger_a_%'AND address_names[array_upper(address_names, 1)] NOT LIKE'RI_ConstraintTrigger_c_%')
5515
+
-- Also filter out toast tables since if there are any non-toast operations the toast ones are almost certainly internally generated
5516
+
(SELECT*FROM pg_event_trigger_dropped_objects() WHERE address_names[array_upper(address_names, 1)] NOT LIKE'RI_ConstraintTrigger_a_%'AND address_names[array_upper(address_names, 1)] NOT LIKE'RI_ConstraintTrigger_c_%'AND schema_name <>'pg_toast')
0 commit comments