The condition for filtering status values uses incorrect boolean logic.
Problematic code:
IF NEW.status != 'healthy' OR NEW.status != 'unhealthy' THEN
RETURN NULL;
END IF;
This condition always evaluates to TRUE, causing the function to return NULL for every status value:
- When status is
'healthy': != 'unhealthy' is TRUE
- When status is
'unhealthy': != 'healthy' is TRUE
- Any other status: both conditions are TRUE
As a result, no events are ever inserted into event_queue regardless of status changes.
The condition for filtering status values uses incorrect boolean logic.
Problematic code:
This condition always evaluates to TRUE, causing the function to return NULL for every status value:
'healthy':!= 'unhealthy'is TRUE'unhealthy':!= 'healthy'is TRUEAs a result, no events are ever inserted into event_queue regardless of status changes.