[Django] #29962: queryset explain() doesn't work with verbose=True

4 views
Skip to first unread message

Django

unread,
Nov 18, 2018, 1:49:38 AM11/18/18
to django-...@googlegroups.com
#29962: queryset explain() doesn't work with verbose=True
-----------------------------------------+------------------------
Reporter: shafikshaon | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 2.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
print(User.objects.filter(is_active=True).explain(verbose=True)) if you
run this, this may throw an exception
- expect using but it doesn't describe in documentation
- return self.query.explain(using=self.db, format=format, **options)
- raise ValueError('Unknown options: %s' % ',
'.join(sorted(options.keys())))
ValueError: Unknown options: verbose

Doc link:
https://docs.djangoproject.com/en/2.1/ref/models/querysets/#explain

--
Ticket URL: <https://code.djangoproject.com/ticket/29962>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 18, 2018, 2:27:50 AM11/18/18
to django-...@googlegroups.com
#29962: queryset explain() doesn't work with verbose=True
-------------------------------------+-------------------------------------
Reporter: Mohd. Shafikur | Owner: nobody
Rahman |
Type: Bug | Status: new
Component: Database layer | Version: 2.1
(models, ORM) |
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mohd. Shafikur Rahman):

* cc: Mohd. Shafikur Rahman (added)
* component: Documentation => Database layer (models, ORM)


--
Ticket URL: <https://code.djangoproject.com/ticket/29962#comment:1>

Django

unread,
Nov 18, 2018, 3:06:13 AM11/18/18
to django-...@googlegroups.com
#29962: Queryset.explain(verbose=True) doesn't work on non-PostgreSQL backend

-------------------------------------+-------------------------------------
Reporter: Mohd. Shafikur | Owner: nobody
Rahman |
Type: Bug | Status: closed

Component: Database layer | Version: 2.1
(models, ORM) |
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* status: new => closed
* resolution: => invalid


Comment:

[https://docs.djangoproject.com/en/2.1/ref/models/querysets/#explain As
documented] `explain()` accepts backend specific options and the the
`verbose=True` option is PostgreSQL specific.

> Some databases accept flags that can return more information about the
query. Pass these flags as keyword arguments. **For example, when using
PostgreSQL**:

I managed to get the exact same error when trying to use `verbose=True`
with SQLite, which I assume is what you tried doing there, and get a
''verbose'' output on PostgreSQL when using the same option.

In the future please use TicketClosingReasons/UseSupportChannels to
confirm your issue is a legitimate bug before filling a ticket.

--
Ticket URL: <https://code.djangoproject.com/ticket/29962#comment:2>

Reply all
Reply to author
Forward
0 new messages