Find trigger functions that are used in case of more than one table. Although it is legal, one must be careful when changing the functions in order to avoid unwanted consequences.
Type
General (Overview of some aspect of the database.)
SELECT action_statement, string_agg(DISTINCT event_object_schema || '.' || event_object_table, '; ' ORDER BY event_object_schema || '.' || event_object_table) AS tables, Count(DISTINCT event_object_schema || '.' || event_object_table) AS nr_of_different_tables, Count(*) AS nr_of_different_triggers
FROM INFORMATION_SCHEMA.triggers
GROUP BY action_statement
HAVING Count(DISTINCT event_object_schema || '.' || event_object_table)>1
ORDER BY Count(DISTINCT event_object_schema || '.' || event_object_table) DESC;
Collections
This query belongs to the following collections:
Name
Description
Find problems by overview
Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not .
Categories
This query is classified under the following categories:
Name
Description
Comfortability of database evolution
Queries of this category provide information about the means that influence database evolution.
Triggers and rules
Queries of this category provide information about triggers and rules in a database.