.. change::
    :tags: bug, sql
    :tickets: 4887

    Custom functions that are created as subclasses of
    :class:`.FunctionElement` will now generate an "anonymous label" based on
    the "name" of the function just like any other :class:`.Function` object,
    e.g. ``"SELECT myfunc() AS myfunc_1"``. While SELECT statements no longer
    require labels in order for the result proxy object to function, the ORM
    still targets columns in rows by using objects as mapping keys, which works
    more reliably when the column expressions have distinct names.  In any
    case, the behavior is  now made consistent between functions generated by
    :attr:`.func` and those generated as custom :class:`.FunctionElement`
    objects.


.. change::
    :tags: usecase, ext
    :tickets: 4887

    Custom compiler constructs created using the :mod:`sqlalchemy.ext.compiled`
    extension will automatically add contextual information to the compiler
    when a custom construct is interpreted as an element in the columns
    clause of a SELECT statement, such that the custom element will be
    targetable as a key in result row mappings, which is the kind of targeting
    that the ORM uses in order to match column elements into result tuples.