#16055: Filtering over generic relations with TextField/CharField object_id breaks in postgres --------------------------------------+------------------------------------ Reporter: anonymous | Owner: nobody Type: Bug | Status: new Component: contrib.contenttypes | Version: 1.3 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------------+------------------------------------ Changes (by timgraham):
* component: Database layer (models, ORM) => contrib.contenttypes Comment: I updated the tests to apply cleanly to master and verified the failure on PostgreSQL 9.4 at 58c7ff39fb265754fb17ab8d7f8a1401b355777b (Django 1.10.dev). {{{ ====================================================================== ERROR: test_charlink_filter (generic_relations_regress.tests.GenericRelationTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/tim/code/django/tests/generic_relations_regress/tests.py", line 57, in test_charlink_filter list(OddRelation1.objects.filter(clinks__title='title')) File "/home/tim/code/django/django/db/models/query.py", line 258, in __iter__ self._fetch_all() File "/home/tim/code/django/django/db/models/query.py", line 1074, in _fetch_all self._result_cache = list(self.iterator()) File "/home/tim/code/django/django/db/models/query.py", line 52, in __iter__ results = compiler.execute_sql() File "/home/tim/code/django/django/db/models/sql/compiler.py", line 839, in execute_sql cursor.execute(sql, params) File "/home/tim/code/django/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) File "/home/tim/code/django/django/db/utils.py", line 92, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/home/tim/code/django/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) ProgrammingError: operator does not exist: integer = character varying LINE 1: ...ON ("generic_relations_regress_oddrelation1"."id" = "generic... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. }}} -- Ticket URL: <https://code.djangoproject.com/ticket/16055#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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.7f556cda77a77df1a79e64b2a60bbf8c%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.