Opened 10 years ago
Last modified 10 years ago
#23709 closed New feature
postgres ArrayField can't access specific array indices in .values(), .aggregate(), etc. — at Initial Version
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
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().
Note:
See TracTickets
for help on using tickets.