def pred_sql(col, val):
    """ Generates SQL for equality predicate.
    
    Args:
        col: predicate restricts this column
        val: filter column using this value
        
    Returns:
        predicate as SQL string (escaped)
    """
    esc_val = str(val).replace("'", r"''")
    return f"{col}='{esc_val}'"