Oracle representation of the IPAddressField
|Reported by:||benk||Owned by:||jacob|
|Component:||Database layer (models, ORM)||Version:||other branch|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The IPAddressField is defined in creation.py as CHAR(15). To my understanding this means that all values in that column will be allocated enough memory to store 15 characters of data regardless if the string being stored is in fact 15 characters long.
I have discovered that for an IP address such as 192.168.1.210 where there are only 13 characters, the data base will pad out my IP address with space characters so that it becomes '192.168.1.210 '. This causes problems when performing searches unless I use 'istartswith'.
Change History (3)
comment:1 Changed 9 years ago by SmileyChris
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset