Opened 11 years ago
Closed 11 years ago
#23709 closed New feature (duplicate)
postgres ArrayField can't access specific array indices in .values(), .aggregate(), etc.
| Reported by: | kalenedrael | Owned by: | |
|---|---|---|---|
| Component: | contrib.postgres | Version: | dev |
| Severity: | Normal | Keywords: | arrayfield |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
ArrayField allows lookups by index when filtering, e.g.
qset.filter(arr__0=foo)
but things like
qset.values('arr__0')
qset.aggregate(Max('arr__0'))
are not allowed.
I'm not sure if this counts as a feature request or bug. From a cursory look at the Django source it seems that this functionality may not be compatible with the way Django handles lookups outside of .filter().
Change History (4)
comment:1 by , 11 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 11 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 11 years ago
| Type: | Uncategorized → New feature |
|---|
comment:4 by , 11 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Closing as a duplicate of https://code.djangoproject.com/ticket/24747
Note:
See TracTickets
for help on using tickets.
This is something that we want to allow, but we just haven't gotten there yet.