Changes between Initial Version and Version 1 of Ticket #16246
- Timestamp:
- Jun 13, 2011, 12:34:00 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #16246 – Description
initial v1 53 53 Strange thing is why people using PosgreSQL 9 doesn't see this? 54 54 55 Once that is fixed, then there are six errors: 56 55 Once that is fixed, then there is one error: 57 56 {{{ 57 ====================================================================== 58 ERROR: test_v4_unpack_uniqueness_detection (modeltests.validation.tests.GenericIPAddressFieldTests) 59 ---------------------------------------------------------------------- 60 Traceback (most recent call last): 61 File "tests/modeltests/validation/tests.py", line 175, in test_v4_unpack_uniqueness_detection 62 giptm.save() 63 File "django/db/models/base.py", line 463, in save 64 self.save_base(using=using, force_insert=force_insert, force_update=force_update) 65 File "django/db/models/base.py", line 556, in save_base 66 result = manager._insert(values, return_id=update_pk, using=using) 67 File "django/db/models/manager.py", line 198, in _insert 68 return insert_query(self.model, values, **kwargs) 69 File "django/db/models/query.py", line 1456, in insert_query 70 return query.get_compiler(using=using).execute_sql(return_id) 71 File "django/db/models/sql/compiler.py", line 810, in execute_sql 72 cursor = super(SQLInsertCompiler, self).execute_sql(None) 73 File "django/db/models/sql/compiler.py", line 754, in execute_sql 74 cursor.execute(sql, params) 75 File "django/db/backends/postgresql_psycopg2/base.py", line 44, in execute 76 return self.cursor.execute(query, args) 77 DatabaseError: invalid input syntax for type inet: "" 78 LINE 1: ..., "v4_ip", "v6_ip") VALUES (E'::ffff:10.10.10.10', E'', E'') 79 ^ 58 80 }}} 59 81 60 They are about the `GenericIPAddressField`'s in that model and the one before it, because they are marked `blank=True` and not `null=True`. From whai I understand: Being Postgres the only backend that doesn't represent the new generic IP address model field with a char DDL field but with a dedicated native data type it doesn't know how to interpret `''` when it is given with such value to store, at least in 8.4. 82 (That causes five errors later in `modeltests.serializers`, `modeltests.proxy_model_inheritance`, `modeltests.fixtures` and `regressiontests.bug639`) 83 84 It's about the `GenericIPAddressField`'s in that model and the one before it, because they are marked `blank=True` and not `null=True`. From whai I understand: Being Postgres the only backend that doesn't represent the new generic IP address model field with a char DDL field but with a dedicated native data type it doesn't know how to interpret `''` when it is given with such value to store, at least in 8.4.