@@ -99,7 +99,9 @@ NOTICE: check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted
99
99
SELECT trigger_name, event_manipulation, event_object_schema, event_object_table,
100
100
action_order, action_condition, action_orientation, action_timing,
101
101
action_reference_old_table, action_reference_new_table
102
- FROM information_schema.triggers ORDER BY 1, 2;
102
+ FROM information_schema.triggers
103
+ WHERE event_object_table in ('pkeys', 'fkeys', 'fkeys2')
104
+ ORDER BY trigger_name COLLATE "C", 2;
103
105
trigger_name | event_manipulation | event_object_schema | event_object_table | action_order | action_condition | action_orientation | action_timing | action_reference_old_table | action_reference_new_table
104
106
----------------------------+--------------------+---------------------+--------------------+--------------+------------------+--------------------+---------------+----------------------------+----------------------------
105
107
check_fkeys2_fkey_restrict | DELETE | public | fkeys2 | 1 | | ROW | BEFORE | |
@@ -368,7 +370,9 @@ FOR EACH STATEMENT WHEN (true) EXECUTE PROCEDURE trigger_func('delete_when');
368
370
SELECT trigger_name, event_manipulation, event_object_schema, event_object_table,
369
371
action_order, action_condition, action_orientation, action_timing,
370
372
action_reference_old_table, action_reference_new_table
371
- FROM information_schema.triggers ORDER BY 1, 2;
373
+ FROM information_schema.triggers
374
+ WHERE event_object_table IN ('main_table')
375
+ ORDER BY trigger_name COLLATE "C", 2;
372
376
trigger_name | event_manipulation | event_object_schema | event_object_table | action_order | action_condition | action_orientation | action_timing | action_reference_old_table | action_reference_new_table
373
377
----------------------+--------------------+---------------------+--------------------+--------------+--------------------------------+--------------------+---------------+----------------------------+----------------------------
374
378
after_ins_stmt_trig | INSERT | public | main_table | 1 | | STATEMENT | AFTER | |
@@ -2030,29 +2034,24 @@ create trigger child3_delete_trig
2030
2034
SELECT trigger_name, event_manipulation, event_object_schema, event_object_table,
2031
2035
action_order, action_condition, action_orientation, action_timing,
2032
2036
action_reference_old_table, action_reference_new_table
2033
- FROM information_schema.triggers ORDER BY 1, 2;
2034
- trigger_name | event_manipulation | event_object_schema | event_object_table | action_order | action_condition | action_orientation | action_timing | action_reference_old_table | action_reference_new_table
2035
- ------------------------+--------------------+---------------------+--------------------+--------------+------------------+--------------------+---------------+----------------------------+----------------------------
2036
- after_ins_stmt_trig | INSERT | public | main_table | 1 | | STATEMENT | AFTER | |
2037
- after_upd_a_b_row_trig | UPDATE | public | main_table | 1 | | ROW | AFTER | |
2038
- after_upd_b_row_trig | UPDATE | public | main_table | 2 | | ROW | AFTER | |
2039
- after_upd_b_stmt_trig | UPDATE | public | main_table | 1 | | STATEMENT | AFTER | |
2040
- after_upd_stmt_trig | UPDATE | public | main_table | 2 | | STATEMENT | AFTER | |
2041
- before_ins_stmt_trig | INSERT | public | main_table | 1 | | STATEMENT | BEFORE | |
2042
- before_upd_a_stmt_trig | UPDATE | public | main_table | 1 | | STATEMENT | BEFORE | |
2043
- child1_delete_trig | DELETE | public | child1 | 1 | | STATEMENT | AFTER | old_table |
2044
- child1_insert_trig | INSERT | public | child1 | 1 | | STATEMENT | AFTER | | new_table
2045
- child1_update_trig | UPDATE | public | child1 | 1 | | STATEMENT | AFTER | old_table | new_table
2046
- child2_delete_trig | DELETE | public | child2 | 1 | | STATEMENT | AFTER | old_table |
2047
- child2_insert_trig | INSERT | public | child2 | 1 | | STATEMENT | AFTER | | new_table
2048
- child2_update_trig | UPDATE | public | child2 | 1 | | STATEMENT | AFTER | old_table | new_table
2049
- child3_delete_trig | DELETE | public | child3 | 1 | | STATEMENT | AFTER | old_table |
2050
- child3_insert_trig | INSERT | public | child3 | 1 | | STATEMENT | AFTER | | new_table
2051
- child3_update_trig | UPDATE | public | child3 | 1 | | STATEMENT | AFTER | old_table | new_table
2052
- parent_delete_trig | DELETE | public | parent | 1 | | STATEMENT | AFTER | old_table |
2053
- parent_insert_trig | INSERT | public | parent | 1 | | STATEMENT | AFTER | | new_table
2054
- parent_update_trig | UPDATE | public | parent | 1 | | STATEMENT | AFTER | old_table | new_table
2055
- (19 rows)
2037
+ FROM information_schema.triggers
2038
+ WHERE event_object_table IN ('parent', 'child1', 'child2', 'child3')
2039
+ ORDER BY trigger_name COLLATE "C", 2;
2040
+ trigger_name | event_manipulation | event_object_schema | event_object_table | action_order | action_condition | action_orientation | action_timing | action_reference_old_table | action_reference_new_table
2041
+ --------------------+--------------------+---------------------+--------------------+--------------+------------------+--------------------+---------------+----------------------------+----------------------------
2042
+ child1_delete_trig | DELETE | public | child1 | 1 | | STATEMENT | AFTER | old_table |
2043
+ child1_insert_trig | INSERT | public | child1 | 1 | | STATEMENT | AFTER | | new_table
2044
+ child1_update_trig | UPDATE | public | child1 | 1 | | STATEMENT | AFTER | old_table | new_table
2045
+ child2_delete_trig | DELETE | public | child2 | 1 | | STATEMENT | AFTER | old_table |
2046
+ child2_insert_trig | INSERT | public | child2 | 1 | | STATEMENT | AFTER | | new_table
2047
+ child2_update_trig | UPDATE | public | child2 | 1 | | STATEMENT | AFTER | old_table | new_table
2048
+ child3_delete_trig | DELETE | public | child3 | 1 | | STATEMENT | AFTER | old_table |
2049
+ child3_insert_trig | INSERT | public | child3 | 1 | | STATEMENT | AFTER | | new_table
2050
+ child3_update_trig | UPDATE | public | child3 | 1 | | STATEMENT | AFTER | old_table | new_table
2051
+ parent_delete_trig | DELETE | public | parent | 1 | | STATEMENT | AFTER | old_table |
2052
+ parent_insert_trig | INSERT | public | parent | 1 | | STATEMENT | AFTER | | new_table
2053
+ parent_update_trig | UPDATE | public | parent | 1 | | STATEMENT | AFTER | old_table | new_table
2054
+ (12 rows)
2056
2055
2057
2056
-- insert directly into children sees respective child-format tuples
2058
2057
insert into child1 values ('AAA', 42);
0 commit comments