Opened 9 years ago

Closed 8 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 Changed 9 years ago by kalenedrael

Description: modified (diff)

comment:2 Changed 9 years ago by Anssi Kääriäinen

Triage Stage: UnreviewedAccepted

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

comment:3 Changed 9 years ago by Tim Graham

Type: UncategorizedNew feature

comment:4 Changed 8 years ago by Josh Smeaton

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