Usage:
{{{
Index(fields=['jsonfield'], index_name='jsonb_idx',
operator_class='jsonb_path_ops')
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28783>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Tim Graham):
Is this only supported on PostgreSQL? Of course, documentation would also
be needed.
--
Ticket URL: <https://code.djangoproject.com/ticket/28783#comment:1>
Comment (by vinay karanam):
AFAICT, this is only supported on psql. I am unable to find similar
feature on other databases.
I've updated the corresponding documentation.
--
Ticket URL: <https://code.djangoproject.com/ticket/28783#comment:2>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/28783#comment:3>
Comment (by Tim Graham):
Is there a need for a separate ticket from #28077? (Is there some
additional work needed to close that or could we just retitle it?)
I'm unsure if adding database-specific kwargs like `operator_class` to
`Index.__init__()` is a good approach, but I don't have an alternative in
mind.
--
Ticket URL: <https://code.djangoproject.com/ticket/28783#comment:4>
Comment (by vinay karanam):
#28077 requires almost same amount of work. It is only asking operator
support for `GinIndex`, whereas this adds support for any postgres index.
We can close it in favour of this or retitle #28077 and close this ticket.
Regarding code changes, even I was skeptical at first about adding
`operator_class` to `Index.__init__()` but then I saw `Index.create_sql`
accepts `using` kwarg which is only valid for postgres index.
If necessary we can have a subclass `PGIndex` and move postgres specific
options into this.
--
Ticket URL: <https://code.djangoproject.com/ticket/28783#comment:5>
* status: new => closed
* resolution: => duplicate
Comment:
Okay, I added the details from this ticket to #28077 and retitled it.
--
Ticket URL: <https://code.djangoproject.com/ticket/28783#comment:6>