[Sqlalchemy-tickets] [sqlalchemy] #2785: Array index in postgres ARRAy
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-07-18 08:05:06
|
#2785: Array index in postgres ARRAy
-------------------------+-----------------------------------------
Reporter: aterentev | Owner: zzzeek
Type: enhancement | Status: new
Priority: low | Milestone:
Component: cextensions | Severity: no triage selected yet
Keywords: | Progress State: awaiting triage
-------------------------+-----------------------------------------
Hi.
When I work with SQLAlchemy and PostgreSQL I find interesting and
unobvious nuance:
When using item of array in filter or order_by there are need to use
indexes starts from 1 (there are no index 0 in pestgres ARRAY)
But, for getting value or values and use it there are need to use indexes
starts from zero.
May be would be better change logic of __getitem__ method of
sqlalchemy.dialects.postgresql.ARRAY for use one standart of indexes in
all situations.
Regards,
Alexey Terentev
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2785>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|