docs: static boolean castToBoolean(final Object in) throws PSQLException {
      if (LOGGER.isLoggable(Level.FINE)) {
        LOGGER.log(Level.FINE, "Cast to boolean: \"{0}\"", String.valueOf(in));
      }
      if (in instanceof Boolean) {
        return (Boolean) in;
      }
      if (in instanceof String) {
        return fromString((String) in);
      }
      if (in instanceof Character) {
        return fromCharacter((Character) in);
      }
      if (in instanceof Number) {
        return fromNumber((Number) in);
      }
      throw new PSQLException("Cannot cast to boolean", PSQLState.CANNOT_COERCE);
    }