Support for binary type fields (aka: bytea in postgres and VARBINARY in mysql)
|Reported by:||Owned by:|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||matthias@…, myer0052@…, Maniac@…, mpjung@…, nelchael@…, sam@…, bsdlogical@…, david@…, vic@…, eric@…, alex@…, django@…, hanne.moa@…, dcwatson@…, spang@…, lidaobing@…, conrad.irwin@…, ivan@…, t.django@…, ruckc@…, clouserw@…, simon@…, bronger@…, phartig@…, daniel.watkins@…, Marti, django@…, inactivist@…, TTimo, slafs@…||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have a need of having fields that store small blips of binary information. In general this works fine with the CharField, however it will not work for all such fields. For example a datum that is just the NUL character, or a series of NUL characters. With postgres at least: "Character strings disallow zero octets,"
These are not things like images or other such large amounts of data. They are typically fairly short (10 to 200 bytes).
For my purposes I created a small patch that adds a new field type that basically is a CharField except it uses the binary type on postgres and mysql.
Does the django project plan on supporting a binary type field, if so should I post my patch for this?
Change History (91)
comment:3 Changed 10 years ago by
|Owner:||changed from Adrian Holovaty to Jacob|
|Status:||new → assigned|
comment:9 Changed 10 years ago by
|Keywords:||binary type field removed|
|Triage Stage:||Unreviewed → Accepted|
comment:72 Changed 5 years ago by
|Patch needs improvement:||unset|
comment:76 Changed 4 years ago by
|Status:||reopened → new|