#10290: grouping with extra_selects produces invalid sql -----------------------------+---------------------------------------------- Reporter: ikelly | Owner: Status: new | Milestone: Component: ORM aggregation | Version: SVN Keywords: | Stage: Unreviewed Has_patch: 0 | -----------------------------+---------------------------------------------- From [9838] on, I'm getting aggregation_regress test failures in Oracle, apparently because annotations with extra selects are adding the extra select aliases into the group by list. This produces invalid SQL (at least in Oracle), since you can't use column aliases defined at the same level within a group by clause.
The attached patch uses the extra select expression itself in the group by, rather than the alias. This passes the tests across all four included backends, and seems to work in general as long as the expression is not a scalar subquery. -- Ticket URL: <http://code.djangoproject.com/ticket/10290> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
