[Django] #27135: Standardise type value returned by introspection.get_constraints for indexes

16 views
Skip to first unread message

Django

unread,
Aug 27, 2016, 10:16:01 AM8/27/16
to django-...@googlegroups.com
#27135: Standardise type value returned by introspection.get_constraints for
indexes
----------------------------------------------+---------------------------
Reporter: akki | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Database layer (models, ORM) | Version: master
Severity: Normal | Keywords: introspection
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+---------------------------
Currently, Django supports introspection of index type for PostgreSQL and
would be [https://code.djangoproject.com/ticket/27097#ticket supporting it
for other backends] as well in future.

Currently the value returned for `type` is arbitrary but it would be
better to set a standard values associated with each index types (like
using `Index.suffix` as suggested by Tim Graham). This discussion might
make it more clear - https://github.com/django/django/pull/7046
#discussion-diff-74431956

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

Django

unread,
Aug 27, 2016, 1:07:32 PM8/27/16
to django-...@googlegroups.com
#27135: Standardise type value returned by introspection.get_constraints for
indexes
-------------------------------------+-------------------------------------
Reporter: akki | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: introspection db- | Triage Stage: Accepted
indexes 1.11 |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* keywords: introspection => introspection db-indexes 1.11
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


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

Django

unread,
Feb 14, 2017, 9:28:09 PM2/14/17
to django-...@googlegroups.com
#27135: Standardise type value returned by introspection.get_constraints for
indexes
-------------------------------------+-------------------------------------
Reporter: Akshesh Doshi | Owner: nobody

Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: introspection db- | Triage Stage: Accepted
indexes 1.11 |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

To address this for 1.11, I think all that's involved is having Django's
database introspection return 'idx' (`Index.suffix`) instead of 'btree'.
It looks like the other indexes (brin/gin for PostgreSQL) are already
returning `Index.suffix`.

Functionality wise, nothing changes since `inspectdb` doesn't consider
indexes yet (#27060) but this will set expectations for third-party
database backends and prevent them from having to change in a future
Django release.

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

Django

unread,
Feb 15, 2017, 1:57:08 PM2/15/17
to django-...@googlegroups.com
#27135: Standardise type value returned by introspection.get_constraints for
indexes
-------------------------------------+-------------------------------------
Reporter: Akshesh Doshi | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: introspection db- | Triage Stage: Accepted
indexes 1.11 |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/8069 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/27135#comment:3>

Django

unread,
Feb 15, 2017, 9:07:56 PM2/15/17
to django-...@googlegroups.com
#27135: Standardise type value returned by introspection.get_constraints for
indexes
-------------------------------------+-------------------------------------
Reporter: Akshesh Doshi | Owner: nobody
Type: | Status: closed

Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: introspection db- | Triage Stage: Accepted
indexes 1.11 |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"b008f7cc5655d01817a8825e6317877b43c92181" b008f7c]:
{{{
#!CommitTicketReference repository=""
revision="b008f7cc5655d01817a8825e6317877b43c92181"
Fixed #27135 -- Made index introspection return Index.suffix.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27135#comment:4>

Django

unread,
Feb 15, 2017, 9:15:38 PM2/15/17
to django-...@googlegroups.com
#27135: Standardise type value returned by introspection.get_constraints for
indexes
-------------------------------------+-------------------------------------
Reporter: Akshesh Doshi | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: introspection db- | Triage Stage: Accepted
indexes 1.11 |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"2f6cdc09c4db46ad13ff736b93a975bcd587abf4" 2f6cdc0]:
{{{
#!CommitTicketReference repository=""
revision="2f6cdc09c4db46ad13ff736b93a975bcd587abf4"
[1.11.x] Fixed #27135 -- Made index introspection return Index.suffix.

Backport of b008f7cc5655d01817a8825e6317877b43c92181 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27135#comment:5>

Reply all
Reply to author
Forward
0 new messages