{{{
Foo.objects.update(bar_array_field__0='random text')
Foo.objects.update(bar_array_field__0=F('other_related_field'))
}}}
I know that 3rd party packages already support this e.g.
[https://github.com/primal100/django_postgres_extensions
django_postgres_extensions], but IMO we should add this to Django.
--
Ticket URL: <https://code.djangoproject.com/ticket/30200>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
Comment:
OK. Seems reasonable.
--
Ticket URL: <https://code.djangoproject.com/ticket/30200#comment:1>
Comment (by Tim Graham):
See also #24709 for using `QuerySet.update()` without indexes.
--
Ticket URL: <https://code.djangoproject.com/ticket/30200#comment:2>
* status: new => assigned
* owner: (none) => Nasir Hussain
--
Ticket URL: <https://code.djangoproject.com/ticket/30200#comment:3>
* has_patch: 0 => 1
Comment:
Created a [https://github.com/django/django/pull/11712 PR].
--
Ticket URL: <https://code.djangoproject.com/ticket/30200#comment:4>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/30200#comment:5>
* owner: Nasir Hussain => Abhyudai
* needs_better_patch: 1 => 0
* has_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/30200#comment:6>
* owner: (none) => Ben Wozniak
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/30200#comment:8>