CREATE OR REPLACE FUNCTION ifnull(value anyelement, null_ anyelement)
  RETURNS anyelement AS
$BODY$
SELECT util.ifnull($1, $2)
$BODY$
  LANGUAGE sql IMMUTABLE
  COST 100;
COMMENT ON FUNCTION ifnull(anyelement, anyelement) IS '
wrapper that prevents views from getting dropped when the util schema is reinstalled
';

CREATE OR REPLACE FUNCTION is_castable(value text, ret_type_null anyelement)
  RETURNS boolean AS
$BODY$
SELECT util.is_castable($1, $2)
$BODY$
  LANGUAGE sql IMMUTABLE
  COST 100;
COMMENT ON FUNCTION is_castable(text, anyelement) IS '
wrapper that prevents views from getting dropped when the util schema is reinstalled
';
