Changes between Version 2 and Version 3 of Ticket #31910


Ignore:
Timestamp:
Aug 19, 2020, 2:37:07 PM (4 years ago)
Author:
Eran Keydar
Comment:

These are the queries from django 2.2 and django 3.1

2.2:

{'sql': 'SELECT ST_Union("__col1")::bytea FROM (SELECT DISTINCT "core_polymodel"."id" AS Col1, "core_polymodel"."name" AS Col2, "core_polymodel"."geom" AS Col3, "core_polymodel"."geom" AS "__col1" FROM "core_polymodel") subquery',
 'time': '0.001'}

3.1

{'sql': 'SELECT ST_Union("__col1") FROM (SELECT DISTINCT "core_polymodel"."id" AS Col1, "core_polymodel"."name" AS Col2, "core_polymodel"."geom" AS Col3, "core_polymodel"."geom" AS "__col1" FROM "core_polymodel") subquery',
 'time': '0.001'}

So it seems that the problem is the missing ::bytea casting

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #31910 – Description

    v2 v3  
    1 The following code works ok on django 2.7, and fails on django 3 and 3.1
     1The following code works ok on django 2.2, and fails on django 3 and 3.1
    22(without the distinct if works ok)
    33
Back to Top