Query 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. |
Query type: | General (Overview of some aspect of the database.) |
Query license: | MIT License |
Data source: | INFORMATION_SCHEMA only |
SQL query: | Click on query to copy it
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; |
Collection name | Collection 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 . |
Category name | Category description |
---|---|
Triggers and rules | Queries of this category provide information about triggers and rules in a database. |
Reference |
---|
https://wiki.postgresql.org/wiki/Is_distinct_from |