Opened 10 years ago

Closed 10 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 kalenedrael)

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 kalenedrael, 10 years ago

Description: modified (diff)

comment:2 by Anssi Kääriäinen, 10 years ago

Triage Stage: UnreviewedAccepted

This is something that we want to allow, but we just haven't gotten there yet.

comment:3 by Tim Graham, 10 years ago

Type: UncategorizedNew feature

comment:4 by Josh Smeaton, 10 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top