G-7450: Never return a NULL value from a BOOLEAN function.

Major

Reliability, Testability

Reason

If a boolean function returns null, the caller has do deal with it. This makes the usage cumbersome and more error-prone.

Example (bad)

CREATE OR REPLACE PACKAGE BODY my_package IS
   FUNCTION my_function RETURN BOOLEAN IS
   BEGIN
      RETURN NULL;
   END my_function;
END my_package;
/

Example (good)

CREATE OR REPLACE PACKAGE BODY my_package IS
   FUNCTION my_function RETURN BOOLEAN IS
   BEGIN
      RETURN TRUE;
   END my_function;
END my_package;
/