CREATE OR REPLACE FUNCTION assert.is_not_null(anyelement, OUT message text, OUT result boolean)
RETURNS record
LANGUAGE plpgsql
IMMUTABLE STRICT
AS $function$
BEGIN
IF($1 IS NOT NULL) THEN
message := 'Assert is not NULL.';
PERFORM assert.ok(message);
result := true;
RETURN;
END IF;
message := E'ASSERT IS_NOT_NULL FAILED. The value is NULL.\n\n\n';
PERFORM assert.fail(message);
result := false;
RETURN;
END
$function$