Goal Use a right predicate in trigger condition in order to ensure that the trigger executes always when it has to but not more often. IS DISTINCT FROM treats NULL as if it was a known value, rather than unknown. It would be relevant if a column that is referenced in the action condition is optional, i.e., permits NULLs.
Type Problem detection Each row in the result could represent a flaw in the design
Reliability Medium Medium number of false-positive results
License MIT (opens in new tab)
Fixing Suggestion Use IS DISTINCT FROM if you compare row variables.
Data Source INFORMATION_SCHEMA only
SQL Query
SELECT trigger_schema, trigger_name, action_timing, action_orientation, event_manipulation, event_object_schema AS table_schema, event_object_table AS table_name, action_condition
FROM INFORMATION_SCHEMA.triggers
WHERE action_condition ~*'\*.*(<>|!=).*\*'
ORDER BY trigger_schema, trigger_name;

Collections

This query belongs to the following collections:

Find problems automatically

Queries, that results point to problems in the database. Each query in the collection produces an initial assessment. However, a human reviewer has the final say as to whether there is a problem or not .

NameDescription
Find problems automaticallyQueries, that results point to problems in the database. Each query in the collection produces an initial assessment. However, a human reviewer has the final say as to whether there is a problem or not .

Categories

This query is classified under the following categories:

Triggers and rules

Queries of this category provide information about triggers and rules in a database.

NameDescription
Triggers and rulesQueries of this category provide information about triggers and rules in a database.