#30200: Add support for using indexes in update() for ArrayFields.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: Jacob1507
Type: New feature | Status: assigned
Component: contrib.postgres | Version: dev
Severity: Normal | Resolution:
Keywords: ArrayField | Triage Stage: Accepted
PostreSQL index update |
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):
Oh fun, I missed the review from the previous attempt :-)
Quoting from
https://github.com/django/django/pull/11712#discussion_r368243765, on a
left-hand-side strategy:
> It feels like the new or adjusted API should call a new
as_update_sql(lhs) method on the lhs that passes the rhs and expect a
(str: sql, Tuple[Any]: params) value to be returned. We have to make sure
that by default this method raises by default so transforms like
update(date__year=2020) fail but they could likely be implemented.
> That would require UpdateQuery.add_update_values to solve the lookups
and resolve both lhs and rhs while disallowing joins and thus aliasing.
You can achieve that by sure making UpdateQuery.alias_cols is always
False.
--
Ticket URL: <https://code.djangoproject.com/ticket/30200#comment:13>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/010701999c47c5b6-fab25c39-10c0-44ac-b93f-0159795b5c51-000000%40eu-central-1.amazonses.com.