#34080: Postgresql/ArrayField: exact filter on NULL nested arrays fails
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  yetanotherion                      |
                   Type:  Bug        |         Status:  new
              Component:  Database   |        Version:  4.1
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 PR:
 https://github.com/pricemoov/django/pull/2/files

 How to reproduce:
 tox -e py39-postgres -- --settings=test_postgres
 postgres_tests.test_array.TestQuerying



 {{{
 django.db.utils.DataError: invalid input syntax for type integer:
 "{NULL,NULL}"
 LINE 1: ...ullableintegerarraymodel"."field_nested" = (ARRAY['{NULL,NUL...

 }}}


 The error seems to be due to the query being generated as

 {{{
 ...ARRAY['{NULL,NULL}']...

 }}}

 instead of

 {{{
 ...ARRAY[ARRAY[NULL,NULL]]...

 }}}

 Note that the bug is not reproduced if at **least one** of the elements in
 the nested array is **not null**.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34080>
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/01070183c0f6f39a-3b6643d6-c31d-4c7e-8d8f-d534719c1fd3-000000%40eu-central-1.amazonses.com.

Reply via email to