#32449: Allow specifying tables in RawSQL().
-------------------------------------+-------------------------------------
Reporter: João Carneiro Haas | Owner: nobody
Type: New feature | Status: closed
Component: Database layer | Version: 3.1
(models, ORM) |
Severity: Normal | Resolution: wontfix
Keywords: annotate, count, | Triage Stage:
RawSQL, select_related, JOIN | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak):
Replying to [comment:3 João Carneiro Haas]:
> Ok, that actually solves the issue I presented, but I'm at fault here,
the `custom_name` example was just the easiest way I found to explain the
issue, we're actually doing a Postgres recursive query, which as far as I
know there's no way to represent in a Django structure.
We have an accepted ticket for CTE, see #28919.
> So, to summarize, if there's a way I'm unaware of about encapsulating my
query in a Django structure (such as in the `Func` `custom_name` example),
yeah, I think this ticket is invalid. Otherwise, I really think there
should be a way to run more specific queries while having the guarantee
that stuff inside the final query will be there.
There is no need for a new API, because resolving #28477 will strip unused
annotation, so crash is a duplicate of #28477. You can also push
everything to a
[https://code.djangoproject.com/ticket/32449?replyto=3#comment:1
subquery].
--
Ticket URL: <https://code.djangoproject.com/ticket/32449#comment:4>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.a68a2f6ffda9d159d5a706175bb6255d%40djangoproject.com.