'Return a new select() construct which will apply DISTINCT to its
columns clause.
:param \*expr: optional column expressions.  When present,
the Postgresql dialect will render a ``DISTINCT ON (<expressions>>)``
construct.'

@_generative
def distinct(self, *expr):

    if expr:
        expr = [_literal_as_text(e) for e in expr]
        if isinstance(self._distinct, list):
            self._distinct = (self._distinct + expr)
        else:
            self._distinct = expr
    else:
        self._distinct = True
