I've researched available django aggregation functions and noticed that logarithm is missing there. So, my question is: how can I use logarithm in annotating the Queryset? I cannot take logarithm after Queryset evaluation, because I need to annotate not exactly with logarithm, but rather with an expression containing it, for example for some models User and Task I need to annotate User with F('task__cost') / Log('task__solved_count').
UPD: It'd be great if I could do it without using database-specific functions (for Postgres), but that solution is possible too.