Annotation: assert.is_not_equal

CREATE OR REPLACE FUNCTION assert.is_not_equal(already_have anyelement, dont_want anyelement, OUT message text, OUT result boolean)
RETURNS record

Information: assert.is_not_equal

Schema assert
Function Name is_not_equal
Arguments already_have anyelement, dont_want anyelement, OUT message text, OUT result boolean
Owner postgres
Result Type record
Description

Implementation: assert.is_not_equal

CREATE OR REPLACE FUNCTION assert.is_not_equal(already_have anyelement, dont_want anyelement, OUT message text, OUT result boolean)
 RETURNS record
 LANGUAGE plpgsql
 IMMUTABLE STRICT
AS $function$
BEGIN
    IF($1 != $2) THEN
        message := 'Assert is not equal.';
        PERFORM assert.ok(message);
        result := true;
        RETURN;
    END IF;
    
    message := E'ASSERT IS_NOT_EQUAL FAILED.\n\nAlready Have -> ' || $1::text || E'\nDon''t Want   -> ' || $2::text || E'\n';   
    PERFORM assert.fail(message);
    result := false;
    RETURN;
END
$function$