Re: [Django] #34409: Examples of fetching raw SQL don't work for non-unique column names. (was: Docs(SQL): Logical error in code sample)

0 views
Skip to first unread message

Django

unread,
Mar 13, 2023, 12:35:23 AM3/13/23
to django-...@googlegroups.com
#34409: Examples of fetching raw SQL don't work for non-unique column names.
--------------------------------------+------------------------------------
Reporter: Jesper Olsson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 4.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* type: Bug => Cleanup/optimization
* stage: Unreviewed => Accepted


Comment:

All examples in this documentation are for a single table, so column names
are unique. Also, there is nothing in the `cursor.description` to help
distinguish columns with the same name. Nevertheless, I agree that we
could add a warning in the docs that returned column names should be
unique. Would you like to prepare a patch?

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

Reply all
Reply to author
Forward
0 new messages