#31450: Querying on ArrayField(PointField) returns string instead of list
-------------------------------------+-------------------------------------
     Reporter:  Nitin Sangwan        |                    Owner:  Hasan
                                     |  Ramezani
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.postgres     |                  Version:  3.0
     Severity:  Normal               |               Resolution:
     Keywords:  ArrayField,          |             Triage Stage:  Accepted
  PointField                         |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 I spent a few hours trying to figure it out but it looks like there might
 be something wrong with `psycopg2`. When registering an array type for
 `geometry` from the retrieved oid it simply doesn't get invoked for
 columns of type `geometry(POINT, srid)[]` behind
 `ArrayField(PointField())`.

 Hasan your code is registering an array type and a scalar type for the
 same `oid`, you want to register a type for the scalar oid and an array
 type for array oid. Look at how `get_hstore_oids` and
 `psycopg2.extras.register_hstore` do it.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31450#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.d81bedaeb15576db164c099a18baa2ef%40djangoproject.com.

Reply via email to