[Django] #28928: Support expression indexes for GinIndex

11 views
Skip to first unread message

Django

unread,
Dec 15, 2017, 7:37:44 AM12/15/17
to django-...@googlegroups.com
#28928: Support expression indexes for GinIndex
--------------------------------------------+------------------------
Reporter: James Howe | Owner: (none)
Type: New feature | Status: new
Component: contrib.postgres | Version: 1.11
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 |
--------------------------------------------+------------------------
I'm envisaging an api such that
{{{
GinIndex(fields=['jdoc.tags[0]'])
}}}
would generate
{{{
CREATE INDEX jdoc_gin ON mymodel USING GIN ((jdoc -> 'tags' -> 0));
}}}

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

Django

unread,
Dec 26, 2017, 5:30:07 PM12/26/17
to django-...@googlegroups.com
#28928: Add support for expression indexes for GinIndex
----------------------------------+------------------------------------

Reporter: James Howe | Owner: (none)
Type: New feature | Status: new
Component: contrib.postgres | Version: 1.11
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 Tim Graham):

* stage: Unreviewed => Accepted


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

Django

unread,
Jun 12, 2018, 1:12:23 PM6/12/18
to django-...@googlegroups.com
#28928: Add support for expression indexes for GinIndex
----------------------------------+------------------------------------
Reporter: James Howe | Owner: (none)
Type: New feature | Status: new
Component: contrib.postgres | Version: 1.11
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
----------------------------------+------------------------------------
Description changed by James Howe:

Old description:

> I'm envisaging an api such that
> {{{
> GinIndex(fields=['jdoc.tags[0]'])
> }}}
> would generate
> {{{
> CREATE INDEX jdoc_gin ON mymodel USING GIN ((jdoc -> 'tags' -> 0));
> }}}

New description:

I'm envisaging an api such that
{{{
GinIndex(fields=['jdoc.tags[0]'])
}}}
would generate
{{{

CREATE INDEX jdoc_gin ON mymodel USING GIN (((jdoc -> 'tags')::jsonb ->
0));
}}}

--

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

Django

unread,
Jun 12, 2018, 1:13:16 PM6/12/18
to django-...@googlegroups.com
#28928: Add support for expression indexes for GinIndex
----------------------------------+------------------------------------
Reporter: James Howe | Owner: (none)
Type: New feature | Status: new
Component: contrib.postgres | Version: 1.11
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
----------------------------------+------------------------------------
Description changed by James Howe:

Old description:

> I'm envisaging an api such that


> {{{
> GinIndex(fields=['jdoc.tags[0]'])
> }}}
> would generate
> {{{

> CREATE INDEX jdoc_gin ON mymodel USING GIN (((jdoc -> 'tags')::jsonb ->
> 0));
> }}}

New description:

I'm envisaging an api such that
{{{
GinIndex(fields=['jdoc.tags[0]'])
}}}
would generate
{{{

CREATE INDEX jdoc_gin ON mymodel USING GIN (((jdoc->>'tags')::jsonb->>0));
}}}

--

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

Django

unread,
Jun 13, 2018, 6:40:30 AM6/13/18
to django-...@googlegroups.com
#28928: Add support for expression indexes for GinIndex
----------------------------------+------------------------------------
Reporter: James Howe | Owner: (none)
Type: New feature | Status: new
Component: contrib.postgres | Version: 1.11
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
----------------------------------+------------------------------------
Description changed by James Howe:

Old description:

> I'm envisaging an api such that


> {{{
> GinIndex(fields=['jdoc.tags[0]'])
> }}}
> would generate
> {{{
> CREATE INDEX jdoc_gin ON mymodel USING GIN

> (((jdoc->>'tags')::jsonb->>0));
> }}}

New description:

I'm envisaging an api such that
{{{
GinIndex(fields=['jdoc.tags[0]'])
}}}
would generate
{{{
CREATE INDEX jdoc_gin ON mymodel USING GIN ((jdoc -> 'tags' -> 0));
}}}

--

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

Django

unread,
Aug 22, 2019, 4:33:10 AM8/22/19
to django-...@googlegroups.com
#28928: Add support for expression indexes for GinIndex
----------------------------------+------------------------------------
Reporter: James Howe | Owner: (none)
Type: New feature | Status: new
Component: contrib.postgres | Version: 1.11
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
----------------------------------+------------------------------------

Comment (by Claude Paroz):

I guess that creating an index like: `CREATE INDEX pgweb_idx ON pgweb
USING GIN (to_tsvector('english', body));` is another use case for this
ticket?

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

Django

unread,
Jan 2, 2021, 2:46:28 PM1/2/21
to django-...@googlegroups.com
#28928: Add support for expression indexes for GinIndex
----------------------------------+-------------------------------------

Reporter: James Howe | Owner: (none)
Type: New feature | Status: closed
Component: contrib.postgres | Version: 1.11
Severity: Normal | Resolution: duplicate
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 Hannes Ljungberg):

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


Comment:

Duplicate of [https://code.djangoproject.com/ticket/26167 #26167].

--
Ticket URL: <https://code.djangoproject.com/ticket/28928#comment:6>

Reply all
Reply to author
Forward
0 new messages