def compile_drop_materialized_view(element, compiler, **kw):
    """
    Formats and returns the drop statement for materialized views.
    """
    text = "DROP MATERIALIZED VIEW {if_exists}{name}{cascade}"
    if_exists = "IF EXISTS " if element.if_exists else ""
    cascade = " CASCADE" if element.cascade else ""
    return text.format(if_exists=if_exists, name=element.name, cascade=cascade)