Skip to content

Unsupported query: mixed type addition in SELECT #19

@timgraham

Description

@timgraham

For example:

======================================================================
ERROR: test_mixed_type_annotation_numbers (annotations.tests.NonAggregateAnnotationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tim/code/django/django/db/backends/utils.py", line 84, in _execute
    return self.cursor.execute(sql, params)
psycopg2.errors.InvalidParameterValue: unsupported binary operator: <int> + <float>

Is there a plan to add support?

The SQL adds integer and float columns in a SELECT clause:

SELECT ... ("annotations_book"."pages" + "annotations_book"."rating") AS "combined"
FROM "annotations_book"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions