<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_db_selection(selection, engine=None):
 """Format a column filter selection as a SQL database WHERE string """

    # parse selection for SQL query
    if selection is None:
        return ''
    selections = []
    for col, op_, value in parse_column_filters(selection):
        if engine and engine.name == 'postgresql':
            col = '"%s"' % col
        try:
            opstr = [key for key in OPERATORS if OPERATORS[key] is op_][0]
        except KeyError:
            raise ValueError("Cannot format database 'WHERE' command with "
                             "selection operator %r" % op_)
        selections.append('{0} {1} {2!r}'.format(col, opstr, value))
    if selections:
        return 'WHERE %s' % ' AND '.join(selections)
    return ''