Hi,

I just noticed a problem with varbinary fields and inspectdb.
When inspectdb processes all fields, it creates varbinary as CharField but 
it needs to be BinaryField.
Using CharField it is impossible to store non-ASCII (non-text) content in 
these columns.

I noticed that problem when I tried to insert a mac address (hex) into a 
varbinary field which needs to be UNHEX()'ed before being inserted.
CharFields forces str() as the value which saves a binary representation as 
the value (b'...).

Inspectdb should always be handled as BinaryField because that is what it 
realy is (currently it is some sort of saving an int as str).

Whats your opinion?

Kind regards
Kevin

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/36547010-a8a2-45ca-97c3-b9c056a10a86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to